MATLAB Answers

Todd Olson

An error with "findall.m" is giving me problems with creating figures

Asked by Todd Olson
on 2 Apr 2013

Whether I attempt to use plot, pcolor, spy, or anything else I get a similar error.

Attempt to execute SCRIPT findall as a function: /home/todd/Documents/IvesLab/MATLAB/toolbox/matlab/graphics/en/findall.m

Error in clo (line 49) kids_to_delete = setdiff(findall(obj,'serializable','on','-depth',1),obj);

Error in cla (line 29) clo(ax, extra{:});

Error in newplot>ObserveAxesNextPlot (line 125) cla(ax, 'reset',hsave);

Error in newplot (line 74) ax = ObserveAxesNextPlot(ax, hsave);

It seems like it's trying to do something with findall that it shouldn't. I have no idea how this would come about.


Matt Kindig
on 2 Apr 2013

What does:

which findall

give you?

Todd Olson
on 4 Apr 2013



No products are associated with this question.

1 Answer

Answer by Walter Roberson
on 2 Apr 2013

You appear to be missing findall.p which is the actual executing part of findall, and is in the graphics directory. findall.m, in the graphics/en directory, is just help information.

Possibly somehow the graphics directory is not on your MATLAB path. Try executing

ls /home/todd/Documents/IvesLab/MATLAB/toolbox/matlab/graphics/find*


Todd Olson
on 4 Apr 2013

This helped. I just had to remove findall.m from my path, but this seems like a shoehorned solution. This seems unnecessary though. Is there potentially some problem with how matlab is searching that is causing it to point to findall.m instead of findall.p?

Walter Roberson
on 4 Apr 2013

The two are in different directories, and .p is defined to be found before .m . But perhaps the wrong directory is first in your matlab path. Try using pathtool to see the order you have the directories in.

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today