UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS
Signals and Systems
Vasileios Evangelos Athanasiou
Student ID: 19390005
Supervisor: Adonis Bogris, Professor
Co-supervisor: Georgios Antoniou, Laboratory Teaching Staff
Athens, April 2021
This README provides an overview of the MATLAB laboratory assignment completed for the Signals and Systems course.
| Section | Folder/File | Description |
|---|---|---|
| 1 | assign/ |
Assignment instructions and exercise description |
| 1.1 | assign/EXERCISE 1 - LEARNING OF MATLAB.pdf |
Exercise instructions (English) |
| 1.2 | assign/ΑΣΚΗΣΗ 1 - ΕΚΜΑΘΗΣΗ ΤΟΥ MATLAB.pdf |
Exercise instructions (Greek) |
| 2 | docs/ |
Documentation related to MATLAB learning exercises |
| 2.1 | docs/Learning-of-Matlab.pdf |
MATLAB learning documentation (English) |
| 2.2 | docs/Εκμάθηση-του-Matlab.pdf |
MATLAB learning documentation (Greek) |
| 3 | src/ |
MATLAB source code files |
| 3.1 | src/m.m |
MATLAB script file |
| 3.2 | src/m1.m |
MATLAB script file |
| 3.3 | src/m2.m |
MATLAB script file |
| 3.4 | src/m3.m |
MATLAB script file |
| 3.5 | src/m4.m |
MATLAB script file |
| 3.6 | src/m5.m |
MATLAB script file |
| 4 | README.md |
Repository overview and usage instructions |
This assignment covers fundamental MATLAB operations, including:
- Vector manipulation
- Custom function creation
- Complex number analysis
- Mathematical visualization and plotting
Objective: Create and manipulate vectors a and b.
Key Operations:
- Vector a defined in interval
[0, 10]with step0.1. - Vector b defined as
cos(x)for interval[0, 20]with step0.2. - Computations included:
- Division
(a / b) - Element-wise power
(a.^4) - Inner product
(a · b')
- Division
Objective: Convert radians to degrees.
- Function name:
gwnia(rad) - Logic: Multiplies input by
180/π - Verification:
π/4 radians correctly converted to 45 degrees.
Objective: Plot the sinc function.
Function definition: sinc(x) = sin(πx) / (πx)
Implementation:
- Interval defined from
-2to2. - Plot formatted using:
plottitlexlabelylabel
Objective: Extract properties of a complex number.
- Function name:
praxis(z) - Outputs:
- Phase (angle)
- Magnitude (absolute value)
- Real part
- Imaginary part
Test cases included:
i-i1e^(3 + 4i)
Objective: Compare two mathematical functions:
Features:
- Figure 1: Both functions plotted together with legend.
- Figure 2: Functions displayed in separate vertical subplots for clearer comparison.
| Command | Description |
|---|---|
linspace |
Generates linearly spaced vectors |
subplot |
Creates multiple plots in one figure |
angle, abs |
Compute phase and magnitude of complex numbers |
real, imag |
Extract real and imaginary parts |
The laboratory assignment demonstrates proficiency in MATLAB basics, function creation, complex number manipulation, and data visualization techniques used in signals and systems analysis.
This guide explains how to install requirements and run the MATLAB exercises contained in this repository.
To run the project, you need:
- MATLAB installed on your system
(Any recent version should work; recommended R2020 or newer) - Basic familiarity with MATLAB scripts and workspace execution
Optional:
- Git (to clone the repository)
Open a terminal or command prompt and run:
git clone https://github.com/Signals-and-Systems-aka-Uniwa/Matlab.git- Open the repository page in your browser.
- Click Code → Download ZIP.
- Extract the archive to a folder on your computer.
- Start MATLAB.
- Click Home → Set Path → Add Folder or:
- Use Set Current Folder in MATLAB.
- Navigate to the repository folder.
- Open the
src/directory.
Recommended folder:
Matlab/src/Each exercise is implemented as MATLAB scripts. From MATLAB:
Double-click any script:
m.m
m1.m
m2.m
m3.m
m4.m
m5.mand press Run.
Run scripts directly:
m
m1
m2
m3
m4
m5Some scripts define or use custom functions such as:
gwnia(rad)— radian to degree conversionpraxis(z)— complex number analysis
Ensure:
- Function files are inside the same folder or
- Folder is added to MATLAB path.
Running scripts will generate:
- Console outputs
- Mathematical calculations
- Function plots
- Subplots comparing signals
- Complex number properties
- Plots appear automatically in MATLAB figure windows.
Ensure current folder is:
Matlab/src/Add folder to MATLAB path:
addpath(genpath(pwd))Make sure script execution finished without errors.
