MATLAB: Value Exceeds while dividing

division

I have 2 matrices
A ranges between -32768 to 32767 ,it is 100×1 matrix
class(A) is int16
B matrix ranges from -1473 to 1570,it is 100×1 matrix
class(B) is double
asuming i divide manually the values ,max(B)/max(A), i get correct answer , but while runnning in m file , the value exceeds
The maximum value must be .049 ,but i get 1.73,
I converted both A and B to double,still i get same error ,
please assist

Best Answer

What happens if you break it up and display the values:
ma = max(A)
class(ma)
size(ma)
mb = max(B)
class(mb)
size(mb)
mb / ma
mb ./ ma