Ask MATLAB Expert

Instructor: William Mugge

Please type your responses to the sections below. The provided descriptions of each section, as well as this text, should be removed after your own writing is complete.

1. Objective

What is the purpose of the experiment?

2. Procedure

Write an explanation of the theory or procedure behind the exercise. Do not re-list the procedure as given in the laboratory manual or give a step-by-step account of the steps you took.

3. Results and Calculations

Give the experimental data in tabular or graphical form. Show samples of calculations. If applicable, include relevant MATLAB results such as graphs of output and command screen history. These can be attached as an appendix if needed.

4. Discussion

Discuss the results or your exercise and show how the objectives were met. Comment on how the results correlate with theoretical values. What are some causes of error in the results?

5. Conclusions

Briefly reiterate the key points of the above sections. Was the experiment considered a success? What (if anything) could have been done differently or better? What are some lessons learned?

Laboratory Exercise: 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

Evaluate the following three functions in the lab using MATLAB:

a) y(t)=4+3t+2e^(-3t)

b) f(t)=2e^(-4t)+sin6t

c) c(t)=5te^(-3(t-2))

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.

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) Y(s)=2/s+6/(s+3)^2

b) F(s)=(s+2)/(s(s+1))

c) C(s)=(4s+6)/((s+1)(2s^2+12s+16))

Show all MATLAB Command Window results. With each window, label the problem with name, problem number and the result.

Laboratory Exercise: 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

Evaluate the following function in the lab using MATLAB:

2 (d^2 y)/(dx^2 ) + 12dy/(dx )+10y=8;y(0)=0 and dy/(dx ) (0)=1

Evaluate the following series of equations using MATLAB:

(di_1)/(dt )+20i_1-10i_2=100u(t)

(di_2)/(dt )+20i_2-10i_1=0

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.

1-a
>>syms t
y(t)=4+3*t+2*exp(-3*t)
laplace(y(t))
y(t) =
3*t + 2*exp(-3*t) + 4
ans =
2/(s + 3) + 4/s + 3/s^2

1-b
>>syms t
>>f(t)=2*exp(-4*t)+sin(6*t)
f(t) =
2*exp(-4*t) + sin(6*t)
>>laplace(f(t))
ans =
2/(s + 4) + 6/(s^2 + 36)
1-c
syms t
>>c(t)=5*t*exp(-3*(t-2))
c(t) =
5*t*exp(6 - 3*t)
>>laplace(c(t))
ans =
(5*exp(6))/(s + 3)^2

2-a

>>syms s
>> y(s)=2/s+6/(s+3)^2;
>>ilaplace(y(s))
ans =
6*t*exp(-3*t) + 2

2-b

>>syms s
>> f(s)=(s+2)/(s*(s+1))
f(s) =
(s + 2)/(s*(s + 1))
>>ilaplace(f(s))
ans =
2 - exp(-t)

2-c

>>syms s
>> c(s)=(4*s+6)/((s+1)*(2*s^2+12*s+16))
c(s) =
(4*s + 6)/((s + 1)*(2*s^2 + 12*s + 16))
>>ilaplace(c(s))
ans =
exp(-t)/3 + exp(-2*t)/2 - (5*exp(-4*t))/6

EX 3

1
>>syms x
>>dsolve('(2*D2y)+(12*Dy)+(10*y)=8','y(0)=0','Dy(0)=1')
ans =
4/5 - exp(-5*t)/20 - (3*exp(-t))/4

2
>>syms t
>> [i1,i2]=dsolve('(Di1)+(20*i1)-(10*i2)=100','(Di2)+(20*i2)-(10*i1)=0','i1(0)=0','i2(0)=0')
i1 =
exp(-30*t)*((5*exp(30*t))/3 + exp(20*t)*(5*exp(10*t) - 5) - 5/3)
i2 =
exp(-30*t)*(exp(20*t)*(5*exp(10*t) - 5) - (5*exp(30*t))/3 + 5/3)

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M91837508
  • Price:- $35

Priced at Now at $35, Verified Solution

Have any Question?


Related Questions in MATLAB

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment details -need to write a code for connecting

Assignment Details - Need to write a code for connecting segments (Lines) a special case of TSP. The problem is to connect lines in 2d/ 3d space with path obstructions. Can you help me write the code for this? Hope you m ...

Assignment -we have daily gridded rainfall data of 40 years

Assignment - We have daily gridded rainfall data of 40 years and structure of the dataset is like below; Lat = [6.5:0.25:38.5]; Lon = [66.5:0.25:100]; Rainfall (135x129x365x40) (Lon, Lat, days, years). Now, we looking fo ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Assignment -data is given on which want to do computational

Assignment - Data is given on which want to do computational production planning using Metaheuristic MATLAB Programming: 1) Ant Colony Algorithm on both Partial and Total Flexible Problem. 2) Bee Algorithm on both Partia ...

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As