I have a line of code that generates a stick figure in 2D:
close all; clear all; clc % Head
syms tx(t) = sin(t);y(t) = cos(t);fplot(x,y+4, 'b', 'LineWidth',2) axis([-10 10 -10 10])hold ongrid on% Stomach
fplot(2*x,2*y-2,'k','LineWidth',2)% Body
syms tx(t) = sym(0);y(t) = t;fplot(x,y,[-4 3], 'b', 'LineWidth',2) % Legs
syms xfplot(2*x-4, [-2 0],'b','LineWidth',2)fplot(-2*x-4,[0 2],'b','LineWidth',2)% Arms
fplot(sym(0), [-2 2],'b','LineWidth',2);% Save Image
filename = 'Stickman.gif';
I am attempting to generate an animation (and save) utilizing the functions getframe and movie to display the "stomach" expanding.
Is there a simple way in which to do this?
Thank you
Best Answer