|
Umal-qura university-------------------------TASK 6--------------------------
|
səhifə | 13/30 | tarix | 23.12.2023 | ölçüsü | 0,73 Mb. | | #156716 |
| Signal and Systems Manual - v2full-------------------------TASK 6--------------------------
Create an m‐file that inputs a number from user and then finds out the factorial of that
number.
Lab # 4
OBJECTIVES OF THE LAB
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
This lab will help you grasp the following concepts:
Discrete Signal representation in Matlab
Matlab Graphics
Two Dimensional Plots
Plot and subplot
Different Plotting Functions Used in Matlab
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
In MATLAB, finite‐duration sequence (or discrete time signal) is represented by row matrix/vector of appropriate values. Such representation does not have any information about sample position n. Therefore, for correct representation, two vectors are required, one for x and other for n. Consider the following finite duration sequence & its implementation:
x(n) = { 1 ‐1 0 2 1 4 6 }
↑
>> n = [‐3:1:3]
n =
‐3 ‐2 ‐1 0 1 2 3
>> x = [1 ‐1 0 2 1 4 6]
x =
1 ‐1 0 2 1 4 6
NOTE # 01: When the sequence begins at n=0, x‐vector representation alone is enough.
NOTE # 02: An arbitrary infinite‐sequence can’t be represented in MATLAB due to limited memory.
-------------------------TASK 01--------------------------
Given the signals:
x1[n] = [2 5 8 4 3]
x2[n] = [4 3 2]
Write a Matlab program that adds these two signals. Use vector addition and multiplication.
Instead of using vector addition and multiplication, use for loop to add and multiply the signals.
Dostları ilə paylaş: |
|
|