While searching for something FM, I came across this code. I am not able to understand a particular line of code. I have written a comment against that line of code.
fs = 1000; fc = 200; t = (0:1/fs:0.2)'; x = sin(2*pi*30*t)+2*sin(2*pi*60*t); fDev = 50; int_x = cumsum(x)/fs; %%% This line of code xfm = cos(2*pi*fc*t).*cos(2*pi*fDev*int_x)-sin(2*pi*fc*t).*sin(2*pi*fDev*int_x) ;
I understand the
cumsum function but I am not able to understand why is he dividing the integration by
Fs i.e. sampling frequency.