diff scripts/plot/private/__patch__.m @ 11188:4cb1522e4d0f

Use function handle as input to cellfun, rather than quoted function name or anonymous function wrapper.
author Rik <octave@nomad.inbox5.com>
date Wed, 03 Nov 2010 17:20:56 -0700
parents 0a8e554494c9
children 01ddaedd6ad5
line wrap: on
line diff
--- a/scripts/plot/private/__patch__.m
+++ b/scripts/plot/private/__patch__.m
@@ -171,25 +171,25 @@
   ## Remove the readonly fields as well
   args = delfields (args, {"type", "uicontextmenu"});
   nargs = length (args);
-  idx = find (cellfun (@(x) strcmpi (x, "faces"), args))(end) + 1;
+  idx = find (strcmpi (args, "faces"), 1, "last") + 1;
   if (idx > nargs)
     faces = [];
   else
     faces = args {idx};
   endif
-  idx = find (cellfun (@(x) strcmpi (x, "vertices"), args))(end) + 1;
+  idx = find (strcmpi (args, "vertices"), 1, "last") + 1;
   if (idx > nargs)
     vert = [];
   else
     vert = args {idx};
   endif
-  idx = find (cellfun (@(x) strcmpi (x, "facevertexcdata"), args), 1, "last") + 1;
+  idx = find (strcmpi (args, "facevertexcdata"), 1, "last") + 1;
   if (isempty(idx) || idx > nargs)
     fvc = [];
   else
     fvc = args {idx};
   endif
-  idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args), 1, "last") + 1;
+  idx = find (strcmpi (args, "facecolor"), 1, "last") + 1;
   if (isempty(idx) || idx > nargs)
     if (!isempty (fvc))
       fc = "flat";
@@ -238,31 +238,31 @@
   ## Remove the readonly fields as well
   args = delfields (args, {"type", "uicontextmenu"});
   nargs = length (args);
-  idx = find (cellfun (@(x) strcmpi (x, "xdata"), args))(end) + 1;
+  idx = find (strcmpi (args, "xdata"), 1, "last") + 1;
   if (idx > nargs)
     x = [];
   else
     x = args {idx};
   endif
-  idx = find (cellfun (@(x) strcmpi (x, "ydata"), args))(end) + 1;
+  idx = find (strcmpi (args, "ydata"), 1, "last") + 1;
   if (idx > nargs)
     y = [];
   else
     y = args {idx};
   endif
-  idx = find (cellfun (@(x) strcmpi (x, "zdata"), args))(end) + 1;
+  idx = find (strcmpi (args, "zdata"), 1, "last") + 1;
   if (isempty(idx) || idx > nargs)
     z = [];
   else
     z = args {idx};
   endif
-  idx = find (cellfun (@(x) strcmpi (x, "cdata"), args))(end) + 1;
+  idx = find (strcmpi (args, "cdata"), 1, "last") + 1;
   if (isempty(idx) || idx > nargs)
     c = [];
   else
     c = args {idx};
   endif
-  idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args))(end) + 1;
+  idx = find (strcmpi (args, "facecolor"), 1, "last") + 1;
   if (isempty(idx) || idx > nargs)
     if (!isempty (c))
       fc = "flat";