how to determine each local min point?
Show older comments
Hi everyone, I have a urgent question to seek for help...
I have a sine wave however, angle in the sine wave is not a constant variation of x as shown below...
x = 0: 0.00001: 4;
v = x.*exp(x/2);
t = sin(v);
plot(x,t);
My trouble is how to display each of the local xmin point?
From the plot itself i wanted to display xmin1 = 1.859, xmin2 = 2.73, and xmin3 = 3.307.
Hope to hear from anyone soon... been cracking my head for the past weeks... )':
Best Regards
Will*
Accepted Answer
More Answers (1)
k=3; %Do this for all desired k>=0
xmin=fzero(@(x) x.*exp(x/2) - 2*pi*k,0)
1 Comment
Matt J
on 6 Mar 2013
There is also a minimum at x=-2, as elementary calculus can tell you.
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!