Wednesday, July 31, 2013

MATLAB Code for ploting Concentric Circles

MATLAB Code for ploting Concentric Circle

In MATLAB  concentric circles can be plot by using transfer characteristics between Sine wave and Cosine wave. MATLAB program is here for plotting three concentric circle  
%%%%%%%%%%%% START %%%%%%%
clc;
clear all;
close all;
t=0:0.0001:10;
sin1=5*sin(2*pi*t);
cos1=5*cos(2*pi*t);
sin2=3*sin(2*pi*t);
cos2=3*cos(2*pi*t);
sin3=1*sin(2*pi*t);
cos3=1*cos(2*pi*t);
plot(sin1,cos1,'r',sin2,cos2,'b',sin3,cos3,'k');
legend('r= 5', 'r= 3', 'r= 1')
grid on;
axis equal;
%%%%%%%%%% END %%%%%%%%

No comments: