cellfun in axis.m produces an error
Bertrand Roessli
bertrand.roessli at psi.ch
Wed Jun 17 08:38:33 CDT 2009
Hello,
I have a script that calls the pcolor
function many times
e.g.
hold on
p=[2,2,0,1.5,2.5,-0.5,0.5];
[x1,y1,z1]=diffuse(p);
pcolor(x1,y1,z1);
p=[1,1,0,0.5,1.5,-0.5,0.5];
[x2,y2,z2]=diffuse(p);
pcolor(x2,y2,z2);
...
With the 'Axis tight' command, I get
this error:
error: cellfun: expecting all values to be scalars for UniformOutput =
true
error: evaluating argument list element number 1
error: evaluating argument list element number 1
The error seems to come from
lims(1) = min (cellfun (@min, data)(:));
lims(2) = min (cellfun (@max, data)(:));
at line 301 in axis.m
I do not know if it solves the problem, but if I replace these
two lines with
lims_min=min(cellfun(@min,cellfun(@min,data,'UniformOutput',false)(:)));
lims_max=max(cellfun(@max,cellfun(@max,data,'UniformOutput',false)(:)));
lims = [lims_min, lims_max];
it works for me.
Bertrand Roessli
More information about the Bug-octave
mailing list