This preview shows page 1. Sign up to view the full content.
Unformatted text preview: t is known as forced vibrations. The actual
analytical solution for this problem is , sin . Implement in MATLAB the equations we derived in class and plot both the analytical and numerical solutions using the main code and subroutine
given below, if 96, =12. %solve_1D Wave
(Complete the following missing information to use the code!)
clear;clc
a= ;
f= inline('
u0=inline('
v0=inline('
g1=inline('
g2=inline('
L= ;
T= ;
nx= ;
nt= ; ','t','x');
','t','x');
','t','x');
');
'); %% Numerical solution:
[u1,t,x]=wave(a,f,u0,v0,g1,g2,L,T,nx,nt);
%% Analytical solution
(is U(i,j)and is given to you. You only need to evaluate it in your me...
View
Full
Document
This document was uploaded on 03/25/2014.
 Winter '14

Click to edit the document details