Thursday, 21 November 2013

Program for subplots of flowers in Matlab


clf n=4; n2=n*n; % for a 2-by-2 graphics window theta=linspace(0,2*pi,200); for j=1:n2 r=sqrt(abs(2*sin(j*theta))); plotnum=[int2str(n),',',int2str(n),',',int2str(j)]; eval(['subplot(',plotnum,')',',',' polar(theta,r)']); end

No comments:

Post a Comment