Finding area of a wave
Ältere Kommentare anzeigen
Hi Assume that, an output of a function(in simulink) is random sine-wave. That random sine-wave is originating at 0 (zero). how can i find out area for the wave above and below origin (Zero). Any logic?
... . . .
. . . . .
. . . . .
. Area1 . . Area3 . .
0________._____._________._____._______
.Area2. . .
. . ...
...
Antworten (1)
Image Analyst
am 27 Feb. 2012
I don't have Simulink so I'm not sure, but do you have the signal as an array? If so can't you just do
positiveSum = sum(signal(signal>0));
negativeSum = -sum(signal(signal<0));
If you need the areas in each half-cycle, then you'll have to find the zero crossings first.
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!