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

54 vues
Accéder directement au premier message non lu

jeff millar

non lue,
7 févr. 2022, 05:06:2207/02/2022
à 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
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message