4 views (last 30 days)

Show older comments

clc

close all

clear

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

theta = 0;

radious_large_circle = 20; % radius of the circle

X_large_circle = zeros(360,360);

Y_large_circle = zeros(360,360);

radious_small_circles = 20/360; % radius of the circle

%radious_small_circles(i) = 20/360;

X_small_circles = zeros(360,360);

Y_small_circles = zeros(360,360);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

while theta < 360

for i=1:360

theta = theta + 1;

for j=1:360

radious_small_circles(i,j) = radious_small_circles(i,j)+ 20/360;

X_large_circle(i,j)= radious_large_circle.*cos(theta.*(pi/180)); % X Corridinate of the circle

Y_large_circle(i,j)= radious_large_circle.*sin(theta.*(pi/180)); % Y Corridinate of the circle

Norm_large_circle(i,j)= sqrt((X_large_circle(i,j))^2 + (Y_large_circle(i,j))^2);

%Norm_large_circle(i,j) = norm(X_large_circle(i,j) , Y_large_circle(i,j));

X_small_circles(i,j)=radious_small_circles.*cos(theta.*(pi/180));

Y_small_circles(i,j)=radious_small_circles.*sin(theta.*(pi/180));

Norm_small_circles(i,j)= sqrt((X_small_circles(i,j))^2 + (Y_small_circles(i,j))^2);

%Norm_large_circle(i,j)= sqrt((X_large_circle(i,j))^2 + (Y_large_circle(i,j))^2); % Resultant component made from X and Y Cooridinates

theta = theta + 1;

end

end

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

figure(1)

%plot(X_large_circle,Y_large_circle)

hold on

plot(X_small_circles,Y_small_circles)

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!