NxRLab / ModernRobotics

Modern Robotics: Mechanics, Planning, and Control Code Library --- The primary purpose of the provided software is to be easy to read and educational, reinforcing the concepts in the book. The code is optimized neither for efficiency nor robustness.
http://modernrobotics.org/
MIT License
1.9k stars 807 forks source link

FKinSpace and FKinBody throw "warning: colon arguments should be scalars" in Octave #37

Open gelanchez opened 3 years ago

gelanchez commented 3 years ago

F​unctions FKinSpace and FKinBody give the following message when executed in Octave: warning: colon arguments should be scalars. This is due to the fact that function size returns a vector containing the number of rows and number of columns. Not sure under MATLAB. I believe the following should be used: for i = 1: size(thetalist)(1) if thetalist is a column vector, i​nstead of: for i = 1: size(thetalist)

HuanWeng commented 3 years ago

Yes you are right. I'm not familiar with Octave but I think size(thetalist, 1) is better in MATLAB. We will change this in our next version.