Simple matrix division in Matlab

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 7K views
nb89
Messages
37
Reaction score
0
I have 2 matrices a=[1 2 3 4] and b=[1 4 9 16], i want to divide each term in matrix b by the same term in matrix a, in other words i want to end up with a matrix of [1 2 3 4].

Ive tried doing b/a, which clearly is wrong!

Thanks for any help
 
Physics news on Phys.org
Dr Transport said:
b./a yields an element by element divide...

thank you, i knew it was something simple :D