Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Claudio
Posts:
15
Registered:
11/18/11


Re: Area under the curve
Posted:
Nov 18, 2011 5:12 AM


> 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



