How to use three built-in functions

Assignment Help Finance Basics
Reference no: EM13921718

Last week was a basic introduction to Matlab. This week you will learn how to use three built-in functions (laplace, ilaplace and dsolve).
Using the syms function

1. An expression can be represented using symbols with the syms function.
Let's study the following example:
syms x y % Declare two symbolic variables x and y
y = x^2 %Declare a function
z=diff(y) %Will calculate the derivative of y and store the value in z.

2. How to find the Laplace transform for an expression?
Example: Find the Laplace transform of sin(2t). From the table of Laplace transforms, the Laplace transform of sin(2t) is . Let us do the same calculation in Matlab.
syms t % Declare a symbolic variable t
F=laplace(sin(2*t)) %Calculate Laplace transform, store in F
pretty(F) % print the output in a more readable form

3. How to find the inverse Laplace transform for an expression?
Example: Find the inverse Laplace transform of From the previous example, the inverse Laplace transform is sin(2t). The following code will verify this calculation in Matlab.
syms s % Declare a symbolic variable s (the Laplace variable)
f=ilaplace(2/(s^2+4)) %Calculate inverse Laplace transform, store in F
pretty(f) % print the output in a more readable form

4. How to solve a differential equation in Matlab?
Example: Solve the differential equation , with initial conditions x(0)=1 and x'(0)= 0.
Matlab command:
dsolve('D2x+2*x=0', 'x(0) = 1, Dx(0) = 0')

Exercises:
1. Find the Laplace transforms of the following functions by hand and verify results using Matlab.
2. Find the inverse Laplace transform of the following functions by hand and verify results using Matlab.

1.
2. F(s)=
3. Solve the following differential equations by hand and verify results using Matlab.

with x(0) = 1, x' (0) = 0

with x(0) = 1, x' (0) = 0

Reference no: EM13921718

Questions Cloud

The interest on some municipal bonds is tax free : The interest on some municipal bonds is tax free, in contrast to the interest on corporate bonds. If the current annual interest rates on otherwise similar (i.e., maturity, credit risk, liquidity) municipal and corporate bonds are 1.48% and 1.80%, re..
Fargo memorial hospital has annual net patient service : Fargo Memorial Hospital has annual net patient service revenues of $14,400,000. It has two major third-party payers, plus some of its patients are self-payers. The hospital's patient account manager estimates that 10 percent of the hospital's paying ..
Variety of performance data for individuals and teams : Predicting Winning Percentage for the NFL The National Football League (NFL) records a variety of performance data for individuals and teams (NFL website). Some of the year-end performance data for the 2005 season appear in the file named NFLStats.
How identity of self is developed in middle childhood : Compare and contrast the populations with the use of meaningful examples for each stage of development and social and personality development of the infant and the psychosocial, social, and moral development of the preschool child.
How to use three built-in functions : Last week was a basic introduction to Matlab. This week you will learn how to use three built-in functions (laplace, ilaplace and dsolve).Using the syms function
The initial working capital requirement : You purchased land 3 years ago for $40000 and believe its market value is now $75000. You are considering building a hotel on this land instead of selling it. To build the hotel, it will initially cost you $165000, an expense that you plan to depreci..
Why have prisoners historically had very few rights : Recognition of prisoner rights has only developed in recent decades. Why have prisoners, historically, had very few rights? What were the main arguments within your selected articles
Compare random selection and random assignment : Compare and contrast random selection and random assignment. Be sure to include a discussion of when you would want to do one or the other and the possible consequences of failing to do random selection or random assignment in particular situation..
Production budget : production and sales data of Shingle Co. for March of the current year, prepare (a) a sales budget and (b) a production budget.

Reviews

Write a Review

Finance Basics Questions & Answers

  Purpose in strategic planning

What is a SWOTT analysis? What is it's purpose in strategic planning? Must you conduct a SWOTT analysis to have an effective strategic plan? Why or why not?

  Calculate the sharpe ratio

Calculate the Sharpe ratio, Treynor ratio, Jensen's alpha, information ratio, and R-squared for both funds and determine which is the best choice for your portfolio.

  Description of future value of money

You want to bank enough money to pay for 4 years of college at $20,000 per year for your child. If you deposit the money on your child's 3rd birthday, how much should you deposit?

  How can the existence of asymmetric information provide a

how can the existence of asymmetric information provide a rationale for government regulation of financial

  Compute the value of this stock price in five years

Compute the value of this stock price in five years. (Do not round intermediate calculations and round your final answer to 2 decimal places.)

  Stock valuation

Stock Valuation

  What was the fair value of all stock-based compensation peet

What was the fair value of all stock-based compensation Peet’s granted to employees in 2008? How many stock options did Peet’s have outstanding at the end of 2008?

  A firm with a pe ratio of 20 wants to take over a firm

a firm with a pe ratio of 20 wants to take over a firm half its size with a pe ratio of 50. what will be the pe ratio

  How would you explain the value of financial planning

How would you explain the value of financial planning to friends or family - Which topics will you discuss with children in your life?

  What is the internal rate of return on this project

The project will require $2,000 of net working capital, which is recoverable at the end of the project. What is the internal rate of return on this project at a tax rate of 34 percent?

  Briarcrest condiments is a spice-making firm recently it

briarcrest condiments is a spice-making firm. recently it developed a new process for producing spices. the process

  Computation of pv of uneven cash flows and lump sum receipt

Computation of PV of uneven cash flows and lump sum receipt and Compute the present value of the following stream of cash flows

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd