HW3 - tr_tau = de_tau .* so_tau t figure(1) plot(t,de,'r',

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%Homework #3 %Problem #2 % clc clear all close all c tau = 4.02; Period = 2.09; P t = [0:.01:2*tau]; t0 = 0; de = -0.334.*exp(-0.25.*t); dei = 0.334.*exp(-0.25.*t); so = sin(2.99.*t); tr = de .* so; t dt = -0.334.*exp(-0.25.*t).*sin(2.99.*t); dtdot = -.0835.*exp(-0.25.*t).*sin(2.99.*t) -.334.*exp(-0.25.*t).*cos(2.99.*t); dt0 = -0.334.*exp(-0.25.*t0).*sin(2.99.*t0); dt0dot = -.0835.*exp(-0.25.*t0).*sin(2.99.*t0) -.334.*exp(- 0.25.*t0).*cos(2.99.*t0); 0 de_tau = -0.334.*exp(-0.25.*tau) de_period = -0.334.*exp(-0.25.*Period) so_tau = sin(2.99.*tau);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tr_tau = de_tau .* so_tau t figure(1) plot(t,de,'r', t,tr,'blue',t,dei,'r') legend('Decaying Exponential', 'Total Response') title('Total Response , Decay Envelope') xlabel('Time, (s)') ylabel('The Response') text(tau,de_tau, '\leftarrow Time Constant') text(Period, de_period, '\leftarrow Period') t figure(2) plot(dt,dtdot, '-b') title('The Phase Curve') xlabel('Total Response, (m)') ylabel('Derivative of Total Response, (m/s)') text(dt0, dt0dot, '\leftarrow Initial Point')...
View Full Document

Ask a homework question - tutors are online