Simple matrix division in Matlab

2 replies · 7K views · last reply
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
 
Dr Transport said:
b./a yields an element by element divide...

thank you, i knew it was something simple :D