Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: What is Derivative Sign change point in a vector?
Replies: 1   Last Post: Dec 2, 2012 11:17 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
m

Posts: 2
Registered: 12/2/12
What is Derivative Sign change point in a vector?
Posted: Dec 2, 2012 11:07 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I think this example is a simple way to find derivative sign change point in a vector:
A=[1 2 3 4 5 4 3 2 1];
dA=diff(A);
z = and((dA>0), circshift(dA<0, [1 -1])); z(1) = 0;
peak=find(z)+1



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.