Some Great Thoughts

"Go ahead and do your best" | "It is the simple things in life that build brilliance in creativity..simplicity cannot be taught, it is inborn..do not tamper with it" | "All men dream but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity; but the dreamers of the day are dangerous men, for they may act their dream with open eyes to make it possible" | "इच्छा हमेशा योग्यता को हरा देती है" | "If you think you can do a thing or think you can't do a thing, you're right. -Henry Ford" | "Failure is success if we learn from it. -Malcolm S. Forbes" | "The future belongs to those who believe in the beauty of their dreams. -Eleanor Roosevelt" | "The great men and women of history are remembered, not because they never made mistakes or never failed, but because they didn't let their failures stop them. They kept on until they succeeded" | "असफलता हमें सिखाती है कि सफलता का प्रयत्न पूरे मन से नहीं किया गया"

Monday, September 12, 2011

Programming in MATLAB for Beginners-3

Multiplication of two Matrices:-
There are two type of multiplication that we can performed in MATLAB
1.Multiplication of two Matrices in normal way:
   A=B*C;
2.Multiplication of each elements of first matrix with corresponding elements of second matrix:
A=B.*C;
it use " . " before " * ". for thsi operation no. of elements should be same in both matices.

Similarly we can perform Division operation.

Some Mathematical Operations & Their Instructions:-


Addition            A=B+C;
Subtraction        A=B-C;
Multiplication     A=B*C;  or  A=B.*C;
Division             A=B/C; or A=B./C; or A=B\C; or A=B.\C;
                         (A=B\C=C/B)
Transpose         B=A';


Power              B=A.^C; or A.^2  (this operation always performed with " . ").
Sum of All Elements of A Matrix
X=sum(A);
Diagonal elements of any matrix
Y=diag(A);
max no. in any matrix
M=max(A);
shortest no. in any matrix
S=short(A);
Average        A=avg(B);


Trigonometric Operations
Sine               A=sin(B);
Cosine           A=cos(B);
Sine Inverse   A=asine(B);

No comments:

Post a Comment