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: Area under the curve
Replies: 9   Last Post: Nov 29, 2011 5:47 AM

Advanced Search

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

Posts: 11
Registered: 11/18/11
Re: Area under the curve
Posted: Nov 18, 2011 5:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> Dear Claudio,
>
> Thank you very much for your reply. I would like to know what does 's' means in the line 'peak_value = max( u_abs( pos - 0.5s : pos + 0.5s) )'
>
> I use Embedded Matlab function block in Simulink so I am trying to figure out how I can implement in it. I see that you have used Matlab code to explain the procedure.
>
> Prashant


Hi Prashant,

That line searches maximum near the position "pos" of the threshold. I wrote +/- 0.5s because it looks like your peaks are about 1 second wide; you should optimize it for your data.
"s" just stand for "seconds": you should replace 0.5s with the corresponding number of samples (I don't know what sampling frequency you are using)

However I have never used Simulink, so I am not sure on how you could implement it in the Embedded Matlab block, sorry! However, this seems like a good starting point:
http://www.mathworks.fr/help/toolbox/simulink/slref/matlabfunction.html

Claudio



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.