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

21 views
Skip to first unread message

jeff millar

unread,
Feb 7, 2022, 5:06:22 AMFeb 7
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;
         hold(hax);
+        ih = ishold;
     else
         ih = ishold;
         if ~ih


hope this helps, 

jeff
Reply all
Reply to author
Forward
0 new messages