0% found this document useful (0 votes)
18 views4 pages

Activity 3

Uploaded by

mlreganon
Copyright
© © All Rights Reserved
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)
18 views4 pages

Activity 3

Uploaded by

mlreganon
Copyright
© © All Rights Reserved
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/ 4

Activity #3

LAPLACE TRANSFORM

Name:________________________________________
Course:_______________________

Date:________________

Objective:

To learn how to compute the Laplace Transform of a function using MATLAB


and analyze the results.
Materials Needed:

 A computer with MATLAB installed

 Access to MATLAB documentation

Pre-Lab Preparation:

1. Review the definition and properties of the Laplace Transform.

2. Familiarize yourself with MATLAB syntax, especially the Symbolic Math


Toolbox.

FUNCTIONS
displays the value of variable X without
syms
printing the variable name
displays the text in prompt and waits
laplace(f, t, s) for the user to input a value and press
the Return key

Part 1: Computing the Laplace Transform

1. In the script, define a continuous-time function. For example, use


−2 t
f ( t )=e sin ⁡(3 t)
syms t s;
f = exp(-2*t) * sin(3*t);

2. Use the laplace function from the Symbolic Math Toolbox to compute the
Laplace Transform of the defined function.

F = laplace(f, t, s);
disp('Laplace Transform:');
disp(F);
Exercise 1:

Calculate the laplace transform of the following equations using MATLAB. Paste the
screenshot of your answer in the table

Function Laplace Transform using MATLAB


−2 t
f ( t )=e

f ( t )=cos ⁡( 4 t)

2
f ( t )=t +3 t+5

f ( t )=sin ⁡(10 t)

−3 t
f ( t )=e cos ⁡( 4 t)
Part 2: Graphical Representation

1. To visualize the original function and its Laplace Transform, plot them over a
suitable range (e.g., from 0 to 5 seconds for the function and in the s-
domain).

% Step 1: Define symbolic variables


syms t s;

% Step 2: Define the time-domain function


f = exp(-2*t) * sin(3*t); % Example function

% Step 3: Compute the Laplace Transform


F = laplace(f, t, s);
disp('Laplace Transform:');
disp(F);

% Step 4: Set up the range for s


s_vals = linspace(0, 10, 100); % Adjust range as needed

% Step 5: Evaluate the Laplace Transform


F_vals = double(subs(F, s, s_vals));

% Step 6: Plot the results


figure;
plot(s_vals, F_vals, 'LineWidth', 2);
xlabel('s');
ylabel('F(s)');
title('Laplace Transform of f(t)');
grid on;

Exercise 2:

Plot the Laplace transform of the following equations using MATLAB. Paste the
screenshot of your answers in the table below. Make sure to paste the graph of the
function in s-domain.

Function Laplace Transform using MATLAB


−2 t
f ( t )=e
f ( t )=cos ⁡( 4 t)

f ( t )=t 2 +3 t+5

f ( t )=sin ⁡(10 t)

−3 t
f ( t )=e cos ⁡( 4 t)

Conclusion:

This lab focuses on understanding and visualizing the Laplace Transform, providing
a solid foundation in this important mathematical tool.

You might also like