Umal-qura university


-------------------------TASK 02--------------------------



Yüklə 0,73 Mb.
səhifə14/30
tarix23.12.2023
ölçüsü0,73 Mb.
#156716
1   ...   10   11   12   13   14   15   16   17   ...   30
Signal and Systems Manual - v2full

-------------------------TASK 02--------------------------


Amplitude scaling by a factor β causes each sample to get multiplied by β. Write a user‐defined function that has two input arguments: (i) a signal to be scaled and (ii) scaling factor β. The function should return the scaled output to the calling program. In the calling program, get the discrete time signal as well as the scaling factor from user and then call the above‐mentioned function.



-------------------------TASK 03--------------------------


0 1 2 3 4 0 1 2 3 4

Write a Matlab program to compare the signals x1[n] and x2[n]. Determine the index where a


sample of x1[n] has smaller amplitude as compared to the corresponding sample of x2[n]. Use for loop.



    1. GRAPHICS

Two‐ and three‐dimensional MATLAB graphs can be given titles, have their axes labeled, and have text placed within the graph. The basic functions are:
Function Description
============================================================================
plot(x,y) plots y vs x
plot(x,y1,x,y2,x,y3) plots y1, y2 and y3 vs x on the same graph stem(x) plots x and draws a vertical line at each
datapoint to the horizontal axis
xlabel('x axis label') labels x axis
ylabel('y axis label') labels y axis
title ('title of plot') puts a title on the plot
gtext('text') activates the use of the mouse to position a
crosshair on the graph, at which point the 'text' will be placed when any key is pressed.
zoom allows zoom IN/OUT using the mouse cursor
grid draws a grid on the graph area
print filename.ps saves the plot as a black and white postscript
file
Shg brings the current figure window forward.
CLF clears current figure.
============================================================================




      1. Yüklə 0,73 Mb.

        Dostları ilə paylaş:
1   ...   10   11   12   13   14   15   16   17   ...   30




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə