Table of Contents

Lab 01 : Introduction / MATLAB

Topics:

HW01 Assignment

For the homework, HW01 follow the emphasized links to get to the detailed description.

Upload your report in PDF format to BRUTE to the assignment L01-Matlab introduction. Please name the PDF file as hw02_<your_fel_id>.pdf. Zip both the MATLAB code and pdf report in a single file and upload to Brute.

MATLAB Introduction

Please make yourself familiar with MATLAB commands, use one of the available tutorials. You can also work with Python, consider using the packages scipy and matplotlib.

Homework tasks(2.5 points each)

Create a 1D signal of the function $y = -3 \cdot x + 1$ over the range [0, 5] with step 0.1. Add uniformly or normally distributed noise within the range [-1, 1] to the signal. Plot the signal as blue circles. Plot also the original line without noise.

matlab1.jpg

Use appropriate spacing of the grid to get a nicely-looking plot, like in the example below:

Hints To add multiple plots to a single figure, use hold on. To then have legend for each of the single plots, get the handle for each(the return values ps and po) and specify the legend manually, as shown in the following snippet:

figure;
ps = scatter(xc, Y, 'b+');
hold on;
po = plot(xc, A * x, 'b');
legend([ps, po], {'Noisy data','Original'});