MATLAB Practical
MATLAB Practical
1234 5 6 7
(9 5 7 5 8 2 1)
2 4 6 8 10 12 14
(ii) After building this matrix reshape this matrix in 1 x N shape where N is the total number of
elements in the given matrix.
(iii) Access only 2nd ,3rd rows and 2nd to 5th columns from the given matrix.
000
(1 1 1)
222
A=
234
(2 1 2)
343
B=
123
(4 1 2)
349
Exercise 7. Find the rank and trace of matrix
146
A= (4 9 2)
367
023
A= (4 0 2)
900
Exercise 9.
5 2−3
(−4 9 2)
9 6−9
Exercise 10.
321
(1 0 2)
320
Exercise 11.
Create a random matrix of size 4X4 with normalized values.
Exercise 12.
Create a cell-array.
Exercise 13.
Write command for any 5 built-in functions.
Exercise 14.
Exercise 15.
Use the colon operator to create a vector of x values ranging from zero to pi, compute the
cosine of these values, and plot the result.
Exercise 16.
Exercise 17.
Exercise 18.
0.9572i
Exercise 19.
Exercise 20.
Plot sin(x) and cos(x) on the same figure using different colors.