MATLAB program for Sinwave signal Generation

Sine Wave:


A sine wave has the same shape as the graph of the sine function used in trigonometry. The sine wave or sinusoid is a mathematical function that describes a smooth repetitive oscillation. It occurs often in pure mathematics, as well as physics, signal processing, electrical engineering and many other fields. It’s most basic form as a function of time (t) is:

y(t) = A sin (wt + ɸ  )
where;
     A, the amplitude, is the peak deviation of the function from its center position.
     ω, the angular frequency, specifies how many oscillations occur in a unit time interval, in
          radians per second
     ɸ, the phase, specifies where in its cycle the oscillation begins at t = 0.
Sine Wave can be obtained by using the following formulae
x=sin(2*pi*fi*n)

Sine wave:-
T=input ('Input time of the Sinusoidal signal= ');
fi=input('Input Frequency of the Sinusoidal signal= );
n =0:0.01:T;
X=sin(2*pi*fi*n);
stem(n,X);
%plot(n,X)
title('input Squence');
xlabel('Time n');
ylabel('Amplitude');
Output Waveform:-
Input time of the Sinusoidal signal= 1
Input Frequency of the Sinusoidal signal= 4 



No comments