DeGracia_Miguel_19481379_lab8

# DeGracia_Miguel_19481379_lab8 - plot(x,t axis-1 1 0 40 a...

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

%% Miguel De Gracia. 19481379. Section 22. Lab Assignment 8. % %% Problem 1 % t=0:30; x=displacement(1,0.1,0:30); plot(x,t) p %% Problem 1a % xlabel('x') ylabel('t') y %% Problem 1b % title('Spring-Mass-Damper Displacement-Time Curve') t %% Problem 1c % axis([-1 1 0 40]) a %% Problem 1d % subplot(2,1,1) t=0:30; x=displacement(1,0.15,0:30); plot(x,t) axis([-1 1 0 40]) a subplot(2,1,2) t=0:30; x=displacement(1,0.3,0:30);
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: plot(x,t) axis([-1 1 0 40]) a %% Problem 1e % t=0:30; x1=displacement(1,0.15,0:30); x2=displacement(1,0.3,0:30); fh=figure; ah=axis; hold on ph1=plot(x1,t); title('Spring-Mass-Damper Displacement-Time Curve') xlabel('x') ylabel('t') % axis([-1 1 0 40]) ph2=plot(x2,t); leg={'alpha=0.15','alpha=0.3'}; legend(leg) %ADD A LEGEND!!! % %% Problem 2...
View Full Document

## This note was uploaded on 02/18/2010 for the course ENGINEERIN 7 taught by Professor Patzek during the Spring '08 term at Berkeley.

Ask a homework question - tutors are online