comparison scripts/plot/pareto.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 be55736a0783
children 01ddaedd6ad5
comparison
equal deleted inserted replaced
11187:0a8e554494c9 11188:4cb1522e4d0f
64 y = varargin {2}(:).'; 64 y = varargin {2}(:).';
65 if (! iscell (y)) 65 if (! iscell (y))
66 if (ischar (y)) 66 if (ischar (y))
67 y = cellstr (y); 67 y = cellstr (y);
68 else 68 else
69 y = cellfun (@(x) num2str (x), num2cell (y), "UniformOutput", false); 69 y = cellfun (@num2str, num2cell (y), "UniformOutput", false);
70 endif 70 endif
71 endif 71 endif
72 else 72 else
73 y = cellfun (@(x) int2str (x), num2cell (1 : numel(x)), 73 y = cellfun (@int2str, num2cell (1 : numel(x)),
74 "UniformOutput", false); 74 "UniformOutput", false);
75 endif 75 endif
76 76
77 [x, idx] = sort (x, "descend"); 77 [x, idx] = sort (x, "descend");
78 y = y (idx); 78 y = y (idx);