cybergalactic / MSS

The Marine Systems Simulator (MSS) is software that supplements the textbook "Handbook of Marine Craft Hydrodynamics and Motion Control," 2nd Edition, by T. I. Fossen, published in 2021 by John Wiley & Sons Ltd.

Home Page:https://mss.fossen.biz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

m2c.m matrix shape error

chihaya-kawamura opened this issue · comments

from line 37 to line 43

M21 = M12';
M22 = M(4:6,4:6);

nu1 = nu(1:3);
nu2 = nu(4:6);
dt_dnu1 = M11*nu1 + M12*nu2;
dt_dnu2 = M21*nu1 + M22*nu2;

>>> I think it should be

M21 = M12.';
M22 = M(4:6,4:6);

nu1 = nu(1:3);
nu2 = nu(4:6);
dt_dnu1 = M11*nu1.' + M12*nu2.';
dt_dnu2 = M21*nu1.' + M22*nu2.';

MATLAB uses the apostrophe operator ( ' ) to perform a complex conjugate transpose, and the dot-apostrophe operator ( . ' ) to transpose without conjugation. For vectors/matrices containing all real elements, the two operators return the same result. Hence, this will not affect the results since M11, M12, M21, M22, nu1 and nu2 are all real elements.

Sorry, I made a mistake.
Thank you Professor.