lab report for jack jones
Laboratory Exercise 2
Laplace and Inverse Laplace Functions in Matlab
Introduction
The programming package MATLAB is used to evaluate the Laplace Transform and Inverse Laplace Transform of several functions. Before entering equations, enter “syms s t” to define s and t as symbols.
Procedure
1. Evaluate the following three functions in the lab using MATLAB:
a)
b)
c)
Convert each of the three equations to frequency domain both by using the MAT lab command and by hand. These equations are determined in MATLAB using the laplace(F) command.
2. Next, evaluate the following frequency domain equations and convert them to time domain. This is the inverse operation and will use the ilaplace(F) MATLAB command.
a)
b)
c)
Show all MATLAB Command Window results. With each window, label the problem with name, problem number and the result.
Laboratory Exercise 2
Differential Equations Solved in MATLAB
Introduction
The programming package MATLAB is used to evaluate the Laplace Transform and Inverse Laplace Transform as well as total solutions for differential equations. Before entering equations, enter “syms s t” to define s and t as symbols.
Procedure
1. Evaluate the following function in the lab using MATLAB:
+ 12
2. Evaluate the following series of equations using MATLAB:
Find equations for each variable. For #1 find the value of y(t). For #2 find the value of i1(t) and i2(t). (Initial conditions for i1(t) and i2(t) are zero)
Use the command dsolve(‘eq1’, ‘eq2’,…,’cond1’,’cond2’,…,’v’) where ‘eq1’ represents the first differential equation in the series and ‘cond1’ represents the first set of initial conditions in the series of equations and ‘v’ represents the independent variable.
Show all MATLAB Command Window results. With each window, label the problem with name, problem number and the result.
The equations above would be entered:
syms s
dsolve(‘(2*D2y)+(12*Dy)+(10*y)=8’,’y(0)=0’,’Dy(0)=1’)
[i1,i2]=dsolve('(Di1)+(20*i1)-(10*i2)=100','(Di2)+(20*i2)-(10*i1)=0','i1(0)=0','i2(0)=0')
Also, on the website is a tutorial titled Solving ODE in MATLAB .