Fixed a bug in trplot(), a function in Robotics Toolbox for MATLAB

Skip to first unread message

jeff millar

Feb 7, 2022, 5:06:22 AM2/7/22
to Robotics & Machine Vision Toolboxes
Hello all, 

Maybe this will help someone.  Got an error when calling trplot() to use an existing axes.

Call format,

   trplot(eye(3, 3), 'axhandle', Ax, 'frame', 'host', 'color', 'black');

Error message,

Undefined function or variable 'ih'.

Error in trplot (line 359)
    if isempty(opt.handle) && ~ih

The problem is that 'ih' is not defined in the branch path using 'axhandle'

The diff looks like this
@@ -233,6 +233,7 @@ function hout = trplot(T, varargin)
     if ~isempty(opt.axhandle)
         hax = opt.axhandle;
+        ih = ishold;
         ih = ishold;
         if ~ih

hope this helps, 

Reply all
Reply to author
0 new messages