MATLAB Assignment

Lab 5 template

%% Lab 5 - Your Name - MAT 275 Lab

% The Mass-Spring System

%% EX 1 10 pts

%A) 1 pts | short comment

%B) 2 pts | short comment

%C) 1 pts | short comment

%D) 1 pts

%E) 2 pts | List the first 3-4 t values either in decimal format or as

%fractions involving pi

%F) 3 pts | comments. | (1 pts for including two distinct graphs, each with y(t) and v(t) plotted)

%% EX 2 10 pts

%A) 5 pts

% add commands to LAB05ex1 to compute and plot E(t). Then use ylim([~,~]) to change the yaxis limits.

% You don't need to include this code but at least one plot of E(t) and a comment must be

% included!

%B) 2 pts | write out main steps here

% first differentiate E(t) with respect to t using the chain rule. Then

% make substitutions using the expression for omega0 and using the

% differential equation

%C) 3 pts | show plot and comment

%% EX 3 10 pts

%A) 3 pts | modify the system of equations in LAB05ex1a

% write the t value and either a) show correponding graph or b) explain given matlab

% commands

%B) 2 pts | write t value and max |V| value; include figure

%note: velocity magnitude is like absolute value!

%C) 3 pts | include 3 figures here + comments.

% use title('text') to attach a title to the figure

%D) 2 pts | What needs to happen (in terms of the characteristic equation)

%in order for there to be no oscillations? Impose a condition on the

%characteristic equation to find the critical c value. Write out main steps

%% EX4 10 pts

% A) 5 pts | include 1 figure and comment

%B) 2 pts

% again find dE/dt using the chain rule and make substitutions based on the

% differential equation. You should reach an expression for dE/dt which is

% in terms of y'

%C) 3 pts | include one figure and comment