MATLAB: Apply an element-wise calculation of an equation to a matrix

element-wise calculation

Hi MATLAB experts,
How should I express the following formulas in order to apply each one to each element in a 3D matrix:
1) ln(X/Y) / Z
2) 100 / ln(X/Y) – 50
Thanks!
Tamir

Best Answer

log( X ./ Y ) ./ Z
100 ./ log( X ./ Y ) - 50