هاوسیستمها سیگنال تمرینعملیاول 71ساعت7314فروردین71دوشنبه:مهلتتحویل 1. Plot the following functions for , using MATLAB. You can use plot and stem functions. Attach your results in your report. In each case, use the best time step for t. i. ii. iii. iv. 2. Assume , then: i. Find the real and imaginary parts of function using MATLAB and plot them. ii. Compute energy of the signal from -2π to 4π with MATLAB. You can use int function. 3. Consider the impulse response and input i. Use conv (read help for conv) function to calculate the convolution of h and x and sketch them. Since the conv function doesn’t keep track of output indices, you should be aware of setting proper indices in the output signal. The following code may help you: nh = 2 : 14; nx = 0 : 14; x = ?; y = ?; y = conv(x, h); ny = ? : ?; figure , stem(ny, y); 39 زمستان هاوسیستمها سیگنال تمرینعملیاول 71ساعت7314فروردین71دوشنبه:مهلتتحویل ii. Calculate and plot y[n] = x[n − 1] ∗ h[n] and compare the result with part (i). Is this system time-invariant? Justify your answer. 4. Open the file “accel_data.txt” which contains the measured acceleration from an accelerometer sensor in x, y and z axes its magnitude. Store them in 4 vectors. You can use the following code for this purpose: [x y z w] = textread(‘accel_data.txt’, ’%d %d %d %d’); i. Now plot the acceleration in each axis separately. As it is visible, the measured information is extremely noisy. ii. Consider the impulse response of a Moving Average (MA) system with the length of 10 which is saved in h. This system is like a Low Pass Filter which can eliminate noise of our signals. h is defined like this: h= ∗ [ 1 1 1 1 1 1 1 1 1 1]; Now convolve the h with each of the x y z acceleration signals and plot the outputs. Is this filter able to eliminate the noise of measured signals? iii. In order to observe the output of signals with different Moving Average systems ,i.e. with different length, write the code of part ii as a function with adjustable length like this: function [output_signal] = ma_filter (input_signal, length) iv. Now convolve the output of your filter with x y z signals using filter lengths of 5, 10 and 50. Attach your results in your report. Please put your code and report in separate folders named code and report, respectively, place both folders in another folder named pa1_lastname_STDID, zip the upper folder and email it to [email protected] with subject “Programming Assignment 1”. For each day of delay your grade will decrease 20%. If any plagiarism found, both students give -100 grades. 39 زمستان
© Copyright 2025 Paperzz