EE301_Lab2
EE301_Lab2
02/21/2025
1 Introduction
In the first part of this lab we will learn how to build a function in MATLAB
and how to approximately compute the signal energy and power. In the
second part we will build block systems in Simulink to examine the linearity
and time-invariant property of certain operations. The report will be due
on Wednesday, Oct 2 2024, 11:59 pm.
3 Guided Exercises
3.1 Energy and Power Signals
Use integral to approximately compute the energy and power of the following
signals and determine the signal type (in terms of energy and power).
3. y3 (t) = 3 square(t)
1
3.2 Plotting functions using arrays and continuous functions
Generate the following waves using both methods of defining a function on a
time array and in analytical form. Use a time interval of 0.5 for the stepsize.
To define a function in analytical form you can use the commands:
1 syms x ;
2 y = sin (x) ;
Plot the functions generated with both methods on the same figure for the
time interval of 0 to 10s. Repeat this for each case separately (3 figures
overall). Comment on the results.
3.3 Linearity
1. Search for the definition of linear systems on chapter 2 of your text-
book. Think about how you can prove a system is linear.
3. Run the simulation from 0s to 10s, save the scope plot and include it
in the report.
2
Figure 1: Verifying Linearity
4 Lab Report
1. Your report should be submitted as a single PDF file, and only the
last submission will be graded.
3
2. The beginning of your report should have your name and USC ID.
3. Please note that all reports should be typed. Your code should be dis-
played along with the results and figures generated. Using MATLAB’s
Publishing tool to export your code and results is recommended.
4. Answer all the questions which were asked in the lab assignment, they
can be included as comments in separate sections of your MATLAB
code. If you prefer to type them separately, remember to merge your
PDF files before submitting the report. Please give written expla-
nation or put comment lines where necessary. Please note that each
figure should have a proper title and axis labels.