How to draw a butterfly in MATLAB?
Actually, it is very simple. Here is the code:

%graph of butterfly
theta = 0:0.01:2*pi;
rho=(cos(5.*theta)).^2+ sin(3.*theta)+0.3;
polar(theta,rho,'r');
title('Graph of Butterfly Curve')

Now you can see like this:

Leave a Reply

Your email address will not be published. Required fields are marked *