1. Write MATLAB codes that verify the following formulae.
a. (a + b) + c = a + (b + c)
b. (a * b) * c = a * (b * c)
c. (x+y)^2= x^2+y^2+2xy
2. What do the following MATLAB functions do? Hint: You coul
SAWAR KHAN
LAB TASK#04
CU1362011C
Q1.Plot the two curves y1= x and y2= 2x on the same graph using different plot styles. Label the plot properly
Code:
x = 0:1:10;
y1 = x.^2;
subplot (1,2,1)
plot(x,y
1. Create an mfile that finds the factorial of a number [Use your class ID] using for loop
(dont use the built in function factorial). [2]
n=28
f=1;
for i=1:n
f=f*i;
end
result in command window
n =
1. Creating vectors
(a) Generate the following vectors:
A = [1 0 4 5 3 9 0 2]
a = [4 5 0 2 0 0 7 1]
Be aware that MATLAB are case sensitive. Vector A and a have different values.
(b) Generate the foll
VIETNAM NATIONAL UNIVERSITY, HANOI
UNIVERSITY OF ENGINEERING AND TECHNOLOGY

SOCIALIST REPUBLIC OF VIETNAM
Independence Freedom Happiness
=
EXAMINATION QUESTIONS AND EXERCISES
1. Course Information

Slide 1: classification of signals; energy, power of signals; elementary signals
Slide 2: systems and properties,
Slide 3: differential Equation, impulse responses, statevariable models, frequency r