Category: MATLAB


Program to draw a circle in MATLAB


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


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,’+’)


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)