MATLAB: Matrix log of certain columns

MATLAB and Simulink Student Suitematrices log column

Hi 🙂
I have to matrices 527040×4 and 527040×4
now i want to calc the log(m1c1) + log(m2c1), log(m1c2)+log(m2c2), log(m1c3)+log(m2c3) and log(m1c4)+log(m2c4)
anybody an idea 🙂

Best Answer

Simply,
result = log(matrix1) + log(matrix2);
then, result(:, 1) is your log(m1c1) + log(m2c1), result(:, 2) is your log(m1c2) + log(m2c2), etc.
Related Question