DeGracia_Miguel_19481379_lab8

# DeGracia_Miguel_19481379_lab8 - % Miguel De Gracia....

This preview shows pages 1–3. 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); 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); figure; axis; hold on plot(x1,t); title('Spring-Mass-Damper Displacement-Time Curve') xlabel('x') ylabel('t') axis([-1 1 0 40]) plot(x2,t,'--'); legend('alpha=0.15','alpha=0.3'); hold off h %% Problem 2a % x=linspace(1,1000,100); y=log(x); semilogx(x,y,'+');

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
grid on xlabel('x') ylabel('y') y %% Problem 2b % x=logspace(-1,3,100); y=log(x); plot(x,y,'+'); grid on xlabel('x') ylabel('y') y %% Problem 2c % load('experiment_data') loglog(x,y); grid on xlabel('x') ylabel('y') %P is the slope of the line formed by the graph. p1=[1,1];
This is the end of the preview. Sign up to access the rest of the document.

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

### Page1 / 5

DeGracia_Miguel_19481379_lab8 - % Miguel De Gracia....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online