As the name suggests MATLAB (Matrix Laboratory) , matrix is the vital part of MATLAB. so today i am going to tell you how to create different types of matrices in MATLAB.
Informally, the terms matrix and the array are often used interchangeably. More precisely , a matrix is a two- dimensional rectangular array of real or complex numbers that represents a linear transformation. The linear algebraic operations defined on matrices have found applications in a wide variety of technical fields.
MATLAB has dozens of functions that create different kinds of matrices. These commands you can try on your command window of MATLAB.
- A=magic(3) % creates random 3 by 3 matrix
- B=pascal(3) % creates symmetric matrix
- C=fix(10*rand(3,2)) % creates 3 by 2 rectangular matrix of random integers
- x=[7;8;9] % produce a column vector
- y=[4 5 -6] % produce a row vector
- z=2 % produce a scalar
Yes I learned and it is very helpful thanks...
ReplyDeleteKeep Posting.....