You are on page 1of 30

1. Everything in MATLAB is stored as matrix. Even the scalars.

2. To write program in Editor window “>>” is not necessary.


3.
4.

5.
6.

7.

8. (‘) is used to transpose matrix. mat = mat’.


9. To determine the size of a matrix size() function is used. size(mat). To store
the size of the matrix in two variables we write an expression similar to
[a,b] = size(mat).
10.We can fill a column using a shortcut. If we want 1 to 10 as a row elements,
we can write mat = [1:10]. We can also specify the increment by using
another colon. For instance, mat = [1:2:10]. Mat has row elements 1 3 5 7
9.
11.To access an element of a matrix, name of matrix(row , column) function is
used. mat(1,2). To print the entire row, in place of column number (:) must
be used. mat(1,:). Similar thing should be done to print entire column.
12.To divide a large matrix into small matrices or to make a small matrix with
some elements from large matrix, rule 5 should be applied.
New matrix = mat(1:3 , 1:2). It means from row 1 to 3 and column 1 to 2.
13.
14.
15.
16.
17.
18.

19.
20.

21.

22.
23.
24.
25.
26.
27.
28.
29.

30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.

42.
43.

You might also like