Animation of consecutive plots

3 views (last 30 days)
Jane
Jane on 20 Apr 2014
Edited: Walter Roberson on 20 Apr 2014
Hi! I'm having trouble with this problem:
Animate the following HW problem by displaying a new plot consecutively for the following values of
d= 130.51 : 0.005 : 180.92. Display each plot for 0.005 seconds before the next one is displayed. Make axis equal but do not display the axis. Display the value of d in the title. Each plot should have 1000 seeds. Use a different color for each plot.
This is what I've come up with so far, but I'm totally stuck:
n=1:1000;
d = 130.51;
th = pi*d.*n./180;
r = sqrt(n);
figure
axis equal
plot(r.*cos(th), r.*sin(th), 'o' )
hold on
x=1:1082;
d= d+ 0.005*x;
Problem 7.4 (already completed): The arrangement of seeds in a sunflower head follows a fixed mathematical pattern. The nth seed is at position r= sqrt(n), with angular coordinate pi*d*n/180 radians, where d is the constant angle of divergence in degrees between any two successive seeds, i.e. between the nth and (n+1)th seeds. A perfect sunflower head is generated by d=137.51. Write a program to plot the seeds; use a circle (o) for each seed.
My program for problem 7.4:
n=1:1000;
d = 137.51;
th = pi*d*n/180;
r = sqrt(n);
plot(r.*cos(th), r.*sin(th), o)
Help would be greatly appreciated! I can't get the inner matrix dimensions to agree and then plot one on top of each other.
THANK YOU

Answers (0)

Categories

Find more on Animation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!