ELECTRICAL
ENGINEERING
DEPARTMENT
SIGNALS AND
SYSTEMS ALL LABS
SUBMITTED BY:
Syeda Fizza Shoaib Zaidi (19-EE-072)
SECTION:
D
SUBMITTED TO:
SIR HAMMAD HAIDAR
, SIGNALS & SYSTEMS
LAB TASKS
LAB 1
SUBMITTED TO: SIR HAMMAD HAIDER
SUBMITTED BY: SYEDA FIZZA SHOAIB ZAIDI
ROLL NO: 19-EE-72
SECTION: D
DATED: 22-02-21
LAB TASK 1
All the operations below are being performed in the Command Window.
1) (a) When we follow the operator rules, division comes before multiplication.
We have,
( * 3) = (2/2) * 3 = 1 * 3 = 3.
Using MATLAB, we get:
(b) 6 - + 72 - 1
2/5 = 0.4, 72 = 49
Thus expression is equal to (6 - 0.4 + 49 - 1) = (5.6 + 48) = 53.6
,c) \ 5 - 3 + 2 * 4
The "\" operator in MATLAB represents the exact division of y by x instead of
representing division of x by y as is usually the case.
Thus, \ 5 evaluates to: (10/2) \ 5 = 5 \ 5 = 1 (In this case 5 \ 5 = = 1.
Generally, x\y gives the result one would expect y/x would give.)
Thus expression is equal to: 1 - 3 + 8 = -2 + 8 = 6
d) 3 ^
is equal to 32/4 = 9/4 = 2.25.
(e) 3 ^ 2 ^ 2
is equal to (32)2 = 34 = 81.
,