my_fmmod(m, A , B , C , fc , fs)

function s= my_fmmod(m, A , B , C , fc , fs)
%here i am going to show the generation of FM signal by the my_fmmod
%function. here m is the modulating signal, A is the amplitude of carrier
%signal, B is the modulation factor, C is the some other constant for
%phase, fc is the carrier frequency , and fs is the sampling frequency. the
%basic principle to modulate the signal as follows
% s(t) = A*cos(2*pi*fc*t + B int m(t)dt + C)
%santosh shah, The LNM IIT Jaipur (India)(santosh.jnt@gmail.com) 22/04/07
% finding the time vector from the messege vector
t= linspace(0, (length(m)1)/fs, length(m));
%processs for computing FM sognal
%first i have to compute the integration part so..
s_int = cumsum(m) / fs;
%now complete FM signal
s = A*cos(2*pi*fc*t + B*s_int + C);
end

