Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

Concentric Circle in MATLAB

Check this video link and first understand , how to plot unit cirlce in MATLAB (as this is going to be the base for plotting concentric circle in MATLAB)

https://www.youtube.com/watch?v=trBHjk4e544

Now How to plot concentric circle in MATLAB??

Check this video:




Algorithm:

1)Define t from 0 to 2*pi(360 degree)
**Note**
You have to give very small increment to make a plot continuous  and proper.

2)Vary the radius of the circle

3)plot all the graphs in a single figure window.

Code:

t=0:0.001:2*pi;
x=cos(t);
y=sin(t);
x1=2*cos(t);
y1=2*sin(t);
x2=3*cos(t);
y2=3*sin(t);
x3=4*cos(t);
y3=4*sin(t);
plot(x,y,'r',x1,y1,'b',x2,y2,'g',x3,y3,'c');
axis equal

Output:


No comments

Popular Posts

Followers