Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1170
Number of posts: 1809

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
MATLAB Polygon Morphing Help Posted by mscott32 on 11 Feb 2012 at 10:27 AM
Hello everyone I am working with MATLAB and I am having some trouble with my assignment.

I have to:

Create a sub-function that will create a list of x and y values that represent the vertices of a random polygon. The input to the function will be the number of vertices. The x and y data should range from -0.5 to 0.5.
Create a sub-function that takes as input the x and y values of a polygon and 'closes' it - i.e. makes the last point the same as the first point.
Create a sub-function that takes as input the x and y values of a closed polygon along with a linetype specifier and an 'iteration number' (I) and plots it with connecting lines and markers at the vertices. The title of the plot should indicate the number of points for the polygon and the iteration number. X and Y axis labels are not required. Pause for (1/I) seconds after plotting.

I am having trouble with creating my main function I am not sure how to generate these values. I tried using linspace but then I couldn't really figure how to make that first sub-function. Any help is much appreciated. Thank you all for your time.





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.