cellfun in axis.m produces an error

Ben Abbott bpabbott at mac.com
Wed Jun 17 08:54:16 CDT 2009


On Wednesday, June 17, 2009, at 09:38AM, "Bertrand Roessli" <bertrand.roessli at psi.ch> wrote:
>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
>

The 'tight' functionality for axis.m was recently modified.

What version of octave are you running. If you're running the developers sources, what is your tip.

Ben


More information about the Bug-octave mailing list