Skip to content

Instantly share code, notes, and snippets.

@CameronCarroll
Created February 23, 2012 04:59
Show Gist options
  • Save CameronCarroll/1890395 to your computer and use it in GitHub Desktop.
Save CameronCarroll/1890395 to your computer and use it in GitHub Desktop.
clear;
clc;
clf;
t=0:0.05:10;
z = (exp(-0.8.*t).*(0.33*cos(8.*t)-0.22*sin(8.*t)));
plot(t,z);
grid on;
xlabel('Time/sec');
ylabel('z(t)');
title('Damping of a Spring');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment