You can use matlab function bsxfun to Divide, Multiply, add and subtract element by element between two arrays. One or both arrays can be matrix.
Example:
To divide a matrix A by a vector array b
A=[1 2 3; 4 5 6];
b=[1 2 3];
D=bsxfun(@rdivide, A,b)
The result will be
D =
1.0000 1.0000 1.0000
4.0000 2.5000 2.0000
Other functions are
@plus to add
@minus to Minus
@times to multiply
Visit Matlab bsxfun page for more details.
Friday, April 5, 2013
Matlab operations between matrix and a vector array - Divide, Multiply, add and subtract element by element with bsxfun
Posted by
vicky
at
2:34 AM
Subscribe to:
Post Comments (Atom)
Popular
- How to add or endorse Spouse/ Husband /Wife name of the passport
- Chanakya TV serial, online on youtube, Vol 1-8, All episodes 1-47
- Unbelievable invention of Bheema's skeleton or Bhima's son Gadotkach like skeleton found: A hoax mail
- Online status of permesso di soggiorno on the website of Polizia di Stato
- SBI transaction on 30-Nov-0019 for INTERNET BANKING, what is this for?
No comments:
Post a Comment