How to find the derivative without using a symbolic function in Matlab?

Let’s learn how to find the derivative without using a symbolic function in Matlab. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

How can I count the number of items using the FIND function in MATLAB?

How can I use the function FIND to count the number of items of a given value instead of using a loop? For example, in the array item below there are 3 occurrences of the number 23, 2 occurrences of the number 22, and 2 occurrences of the number 20. .... for i=2:n if item(i-1)~=item(i) nItem21(i)=1; else nItem21(i)=nItem21(i-1)+1; end end item Num 23 2 23 4 23 6 22 3 22 1 20 6 20 8

Answer:

You can do the following: identify where the value of item changes, then use diff to get the counts...

Read more

Jessy at Stack Overflow Mark as irrelevant Undo

Other solutions

Is there a way to find Palindromes in Matlab without using the fliplr(x) function?

I want to write a function in Matlab to find out if a word is a Palindrome without using the fliplr(x) function.

Answer:

i don't know Matlab, but i'll write it in psuedocode. a palindrome is a word that is the same as it...

Read more

Jasmon Scott at Yahoo! Answers Mark as irrelevant Undo

Optimization problem using matlab?

I have a problem for my final project, it's about shape design of multi segments rotating disk using matlab optimization toolbox. say if I have given input parameters Lmin, Lmax, L2, Lm, P2,Pm,(R2,...,Rm),N (all this parameters are known) where L, P...

Answer:

Use calculus to minimize: in other words, set the derivative of " σ tangential (max)"...

Read more

Spherics at Yahoo! Answers Mark as irrelevant Undo

Is there anyway to generate Gaussian samples with the rand function for Matlab?( Without using randn)?

I wish to simulate the 'randn' function in Matlab using only the 'rand' function but cannot seem to get it to work. I wonder if it may hav something to do with the central limit theorem?

Answer:

It can be done. I TA'd for a class, and one of the problems on a problem set instructed on how to do...

Read more

Michael H at Yahoo! Answers Mark as irrelevant Undo

How to Find Vector Length in MATLAB Without Using Any MATLAB Functions?

How would I be able to find the length of a vector only using simple arithmetic and loops? For example, I can't use functions like find(), length(), fft(), etc.

Answer:

You should never need a loop in MATLAB to do vector operations. Edit: Use multiplication and transpose...

Read more

Bob at Yahoo! Answers Mark as irrelevant Undo

Question in MatLab by using fminbnd function?

A water tank consists of a cylindrical part of radius r and height h, and a hemispherical top. The tank is to be constructed to hold 500 m^3 when filled. The surface area of the cylindrical part is 2*pi*r*h, and its volume is pi*r^2*h. The surface area...

Answer:

first: look at your given equations. 1) V = 500m3 = pi*r^2*h + (2/3)*pi*r^3 2) SA = 2*pi*r*h + 2*pi...

Read more

JW32 at Yahoo! Answers Mark as irrelevant Undo

Do you have any example of code using matlab objective function for processes such as in factory?

Any processes such as in factories that implement the matlab objective function. Example die process.

Answer:

See these examples on optimization and use of objective functions: http://matrixlab-examples.com/mathematic...

Read more

roxanne at Yahoo! Answers Mark as irrelevant Undo

How to find out the delay between same time sequence signals(received by two sensors) using matlab software?

the same signal is received by two sensors which are at different positions. how to find out the delay between the signals received by these sensors using Matlab.delay must be as accurate as possible.

Answer:

Use a laser,- duh!

Read more

girish k at Yahoo! Answers Mark as irrelevant Undo

Numerical Analysis: How does one write a MATLAB program to find the derivative of f(x)=xcosxf(x)=x^{\cos x}  using the Richardson extrapolation table?

Can anyone write a MATLAB program to find the derivative of the following: f(x)=xcos(x) f(x)=x^{cos(x)} The inputs to the program are: x h The outputs are f'(x) = D(3,3), The estimated error = D(3,3) - D(3,2) Theoretically, I can solve it using...

Answer:

Instead of Richardson's, you can use the complex step derivative, which gives pretty accurate first...

Read more

Paul Artois at Quora Mark as irrelevant Undo

How to achieve summation for elements of a matrix using MatLab (symsum) function?

I need to sum the values of all elements of 1st row using the summation function (symsum). How can I accomplish this? The matrix is a 512X512 one. This is the syntax: symsum(k,1,512) k is a symbol only... Can I refer it as an element? I tried inputting...

Answer:

symsum has usage like symsum(a,b,c) (not symsum[a,b,c]), thus your expression cannot be computed and...

Read more

Joe at Yahoo! Answers Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.