15,917,455 members
See more:
how can i integrate the signal to find the area under the curve of this signal in malab
Posted
Sandeep Mewara 10-May-11 2:30am

## Solution 2

Matlab has an amazing help support. You can find almost all the functionalities with an example in Matlab help section.

Why don't you try them ?

For This particular question of yours, you can Do it using two different methods.

* CUMSUM
* TRAPZ ( Trapezoidal Integral )

Using CUMSUM :
Depending on what Domain your signal is sampled you can do one of the following methods. ( Assuming the Signal yo be Y )
-- In Frequency Domain :
integralOfY = CUMSUM (Y) / f ( where f : sampled frequency )

-- In Time Domain :
integralOfY = CUMSUM (Y) . * [ 1; diff(t)] ( where t : sampled time interval )

Using TRAPZ :

-- Z = TRAPZ ( Y ) : Integral of Y
-- Z = TRAPZ ( X, Y) : Integral of Y wrt X

BR//
Harsha

Albert Holguin 16-May-11 13:08pm
this: integralOfY = CUMSUM (Y) / f, would give you the area under the curve up til the sampling frequency itself, which would be the regular spectrum and the inverted spectrum (giving you twice the value).......... good info though, my 4
ZeeroC00l 17-May-11 1:22am
@Albert :
Yes, you are correct. Sorry for not making it Perfectly clear.

But if you are looking for finding the area under the curve with 2 limiting values I would suggest the Trapezoidal rule is the best one for that.

## Solution 1

what's your signal format? if its already digitized, it's just treated as binary data.