From: Anusha on
Hii All,

I want to frequency modulate a digital signal.In the code given to me,i found a statement.
int_m=cumsum(signal)./fs;

and the frequency modulation is implemented using basic equation of FM.
s=cos(2 pi fc t+ 2 pi fd int_m)+ j sin(2 pi fc t+2 pi fd int_m)

My question is if we do integration of signal using cumsum function,will it b accurate?? is it better to attempt with cumtrapz?

Thank you