Showing posts with label continuous time sinusiod code. Show all posts
Showing posts with label continuous time sinusiod code. Show all posts

Wednesday, 18 June 2014

PLOTTING A CONTINUOUS TIME SINUSIOD


To plot a continuous time sinusiodal copy this code and paste it in installed matlab sofware, run the program you will get wave given below in the diagram.
%PART-A
a=10;
f=1000;
ph=pi/2;
T=1/f;
t=0:T/40:10*T; %10 cycles
x=a*sin(2*pi*f*t+ph);
plot(t,x),
xlabel('t'),
ylabel('x'),
title('PLOTTING A CONTINUOUS TIME SINUSIOD'),
grid on

%PART-B
a=10;
f=1000;
ph=pi/2;
T=1/f;
t=0:T/40:10*T; %10 cycles
x=a*cos(2*pi*f*t+ph);
plot(t,x),
xlabel('t'),
ylabel('x'),
title('PLOTTING A CONTINUOUS TIME SINUSIOD'),
grid on