Beruflich Dokumente
Kultur Dokumente
LAB NO. 1
Objective:
To generate a sinusoidal signal in matlab.
Softwares Used:
MATLAB R2011a
Procedure:
Coding of Program:
>> t=0:0.1:10;
>> y=sin(t);
>> plot(t,y);
Resulting Figure:
The following figure is shown when I pressed Enter.
Software Used:
MATLAB R2011a
Procedure:
Code Of Program
>> t=0:0.1:10;
>> y=sin(t);
>>
y=sin(t)+sin(3*t)/3+sin(5*t)/5+sin(7*t)/7+sin(9*t)/9+sin(11*t)/11+sin(13*t)/13+sin(15*t
)/15+sin(17*t)/17+sin(19*t)/19+sin(21*t)/21+sin(23*t)/23;
>> plot(t,y);
Resulting Figure:
The following figure is shown when I pressed Enter.
Objective:
How to generate a discrete sin wave in matlab.
Software Used:
MATLAB R2011a
Procedure:
Coding of Program:
>> t=0:0.1:10;
>> y=sin(t);
>> stem(t,y);
Resulting Figure:
The following figure is shown when I pressed Enter.
Objective:
To generate a sin wave using linspace command in matlab.
How to generate a sin wave in matlab using linspace command.
Software Used:
MATLAB R2011a
Procedure:
Code of program:
>> x=linspace(5,-5);
>>y=sin(x);
>>plot(x,y);
>>xlabel('-5 < x < 5');
Resulting Figure:
The following figure is shown when I pressed Enter.
Objective:
To generate a sin wave using linspace command from -2 to 2 in matlab and label its
x-axis..
Tools Used:
MATLAB R2011a
PROCEDURE
Code of Program:
>> x=linspace(-2*pi,2*pi);
y=sin(x);
plot(x,y)
xlabel('-2/pi < x < 2/pi');
Resulting Figure:
The following figure is shown when I pressed Enter.
Objective:
To study the noise signal in sinusoidal signal.
How to interperate the noise signal.
Software Used:
MATLAB R2011a
PROCEDURE
Program Code:
>> N=200;
>> T=0.05;
>> t=(0:N-1)*T;
>> s=sin(2*pi*120*t);
>> plot(t,s)
Resulting Figure:
The following figure is shown when I pressed Enter.