Personal tools

animate.m

animate.m — Objective-C source code, 0Kb

File contents

function [kk]=animate(F)

theta    = F(:,1);
phi      = F(:,2);
thetadot = F(:,3);
phidot   = F(:,4);


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------+--------------------------+-------------------+--------------
% Quantity  | Value                    | Units             | Description
%-----------|--------------------------|-------------------|--------------
GAMMA       = 0.009;            % ground slope, (rad)
L           = 1.00;             % leg length, (m)
g           = 1.00;             % "gravitational acceleration constant"
BETA        = 1/100;            % mass foot/mass hip, (dimensionless)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


for n=1:10:length(F)    
    X = [theta(n);phi(n);thetadot(n);phidot(n)];
    draw(X)
%     pause(0.01),
    pause(0.3),
    clf
end

draw([F(end,:)]')
title('Walker Configuration at end of Swing')
pause(0.5)

end

Document Actions