Click here to Skip to main content
15,935,429 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i integrate the signal to find the area under the curve of this signal in malab
Sandeep Mewara 10-May-11 2:30am    
Tried Google? Mathswork website?

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.

* 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

Share this answer
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.
what's your signal format? if its already digitized, it's just treated as binary data.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900