Professional Documents
Culture Documents
Experiment 2
Experiment 2
AimWrite a MATLAB program to define the vectors u=[1 2 3 4] and v=[2 3 4 5].Now determine the following using MATLAB-: (a) Multiply vector v with a scalar quantity 5. (b)Take the power of 5 of a vector u. (c)Take the power of 5 of a vector v. (d)Multiply the vectors element by element. (e)First take the transpose of a vector v and then multiply the vector u and v.
Outputu=
v=
a=
10 15 20 25
b=
32
243
1024
c=
32
243
1024
3125
d=
6 12 20
e=
2 3 4 5
f=
40