Experiment No. 1: Object: - To Design Sine Wave Using Matlab. Program

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Experiment No.

1
Object: - To design sine wave using matlab.
Program:clc;
clear all;
close all;
f= input('enter the frequency in hertz of the sine wave');
t=0:.0001:5;
y=sin(2*pi*f*t);
plot(t,y);
ylabel ('Amplitude');
xlabel ('Time Index');
TITLE ('Sine wave');

Experiment No. 2
Object: - To design cosine wave using matlab.
Program:clc;
clear all;
close all;
f= input('enter the frequency in hertz of the sine wave');
t=0:.0001:5;
y=cos(2*pi*f*t);
plot(t,y);
ylabel ('Amplitude');
xlabel ('Time Index');
TITLE ('cosine wave');

Experiment No. 3
Object: - To design random binary wave using matlab.
Program:clc;
clear all;
close all;
a=0;
b=1;
x=b*rand(1,9);
plot(x);
xlabel(random);
TITLE(Random Binary Wave);

Experiment No. 4
Object: - To design continuation cos wave using matlab.
Program:clc;
clear all;
close all;
x=-pi: .01:pi;
y=cos(x);
plot(x,y);
xlabel(n);
ylabel(cos(n));
TITLE(Cos Wave);

Experiment No. 5
Object: - To design continuation sine wave using matlab.
Program:clc;
clear all;
close all;
x=-pi: .01:pi;
y=sin(x);
plot(x,y);
xlabel(n);
ylabel(sin(n));
TITLE(Sine Wave);

You might also like