0% found this document useful (0 votes)
21K views6 pages

Control

The document shows examples of taking the Laplace transform of different functions. It begins with simple functions like 4-4*exp(-0.5*t) and works up to more complex functions involving exponentials and polynomials, like t*exp(-2*t). It demonstrates using laplace to calculate the Laplace transform and pretty to write the result in a nicer fractional form. It also shows dealing with errors that can occur from undefined functions or variables.

Uploaded by

Alejandro Yugcha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21K views6 pages

Control

The document shows examples of taking the Laplace transform of different functions. It begins with simple functions like 4-4*exp(-0.5*t) and works up to more complex functions involving exponentials and polynomials, like t*exp(-2*t). It demonstrates using laplace to calculate the Laplace transform and pretty to write the result in a nicer fractional form. It also shows dealing with errors that can occur from undefined functions or variables.

Uploaded by

Alejandro Yugcha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

syms t;

>> f=(4-4*exp(-0.5*t))

f=

4-4*exp(-1/2*t)

>> ans=laplace(f)

ans =

4/s-4/(s+1/2)

>> pretty(ans)

4
4/s - ------s + 1/2
>> pretty(ans)

4
4/s - ------s + 1/2
>> syms t;

>> f=3*t*ex(-2*t6)
??? Undefined function or variable 't6'.

>> f=3*t*ex(-2*t)
??? Undefined command/function 'ex'.

>> f=3*t*exp(-2*t)

f=

3*t*exp(-2*t)

>> ans=lapalce(f)
??? Undefined command/function 'lapalce'.

>> ans=laplace(f)

ans =

3/(s+2)^2

>> pretty(ans)

-------2
(s + 2)
>> pretty(ans)

3
-------2
(s + 2)
>> syms t;
>>
>> f=t*ex(-2*t)
??? Undefined command/function 'ex'.

>> f=t*exp(-2*t)

f=

t*exp(-2*t)

>> ans=laplace(f)

ans =

1/(s+2)^2

>> pretty(ans)

1
-------2
(s + 2)
>> syms t;
>>
>> f=t*ex(-2*t)
??? >>
|
Error: Missing variable or function.

>> f=t

f=

>> ans=laplace(f)

ans =

1/s^2

>> pretty(ans)

1
---2
s
>> syms t;
>> f=1

f=

>> ans=laplace(f)
??? Function 'laplace' is not defined for values of class 'double'.

>> f=t*exp(0*t)

f=

>> f=1*exp(0*t)

f=

>> ans=laplace(f)

ans =

1/s

>> pretty(ans)

1/s

You might also like