Question: A script to produce a movie for the butterfly plot. Explain the code line by line. MECH 3500: Computer Programming and Applications 8. plot(x, y,xx,
A script to produce a movie for the butterfly plot. Explain the code line by line.
MECH 3500: Computer Programming and Applications 8. plot(x, y,xx, yy,,y,'o','MarkerFaceColor','b','MarkerSize', 8); 9. axis(-44-4 41) 10. axis square 11. M(1) getframe; 12. for i-2:length(t) 13. x= s in (t(1)) ."(exp (cos (t(1)))-2-cos (4,*t (1))-sin(t(i)/12).^5); 14. y=cos ( t (1)).* (exp (cos ( t (1)))-2-cos (4, *t (1))-sin (t (1) /12)-5); 15. xx-1xx x: 16, yy= yy y]; 17. plot (x, y,xx,yy xy', 'MarkerFaceColor', 'b', 'MarkerSize',8) 18. axis(1-44-4 41) 19. axis square 20. M(i)-getframe; 21. end
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
