Related posts:
Program to add two continuous signals in MATLAB
Program for convolution of continuous sequences in MATLAB
_____________________________________________________________________________________________________
Program to draw a circle in MATLAB:
r=2;
t=0:pi/24:2*pi;
x=r*cos(t);
y=r*sin(t);
plot(x,y,x,y,'*')
grid on
Showing posts with label MATLAB. Show all posts
Showing posts with label MATLAB. Show all posts
Saturday, 30 April 2011
Friday, 29 April 2011
Program for addition of two continuous signals in MATLAB
Program for addition of two continuous signals in Matlab:
x=linspace(0,2*pi,100);
a=sin(x);
b=cos(x);
c=a+b;
y=plot(x,a,x,b,'*',x,c,'+')
x=linspace(0,2*pi,100);
a=sin(x);
b=cos(x);
c=a+b;
y=plot(x,a,x,b,'*',x,c,'+')
Program for convolution of two continuous sequences in MATLAB
Here is the program for convolution of two continuous sequences in MATLAB:
x=[1 0 -1 1 1];
t1=length(x);
h=[1 1 1 1 1];
t2=length(h);
y=conv(x,h);
t=1:1:t1+t2-1;
plot(t,y)
x=[1 0 -1 1 1];
t1=length(x);
h=[1 1 1 1 1];
t2=length(h);
y=conv(x,h);
t=1:1:t1+t2-1;
plot(t,y)
Subscribe to:
Posts (Atom)