Develop a script to produce a movie for the butterfly plot from Prob. 2.22. Use a particle
Question:
Develop a script to produce a movie for the butterfly plot from Prob. 2.22. Use a particle located at the x-y coordinates to visualize how the plot evolves in time.
Data From Problem 2.22
Develop a function to produce an animation of a particle moving in a circle in Cartesian coordinates based on radial coordinates. Assume a constant radius, r, and allow the angle, θ , to increase from zero to 2 in equal increments. The function’s first lines should be
function phasor(r, nt, nm)
% function to show the orbit of a phasor
% r = radius
% nt = number of increments for theta
% nm = number of movies
Test your function with
phasor(1, 256, 10)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Question Posted: