Print command erroring with 'Undefined function or method 'findprop' for input arguments of type 'struct'.'
Show older comments
Recently the print function in matlab has stopped working on one computer of mine, specifically for print('-dmeta'). I use this function extensively for putting figures into powerpoints - but it fails regardless of how I call it. The same code works on other computers. I also can't save figures, weither from the GUI or using matlab functions as it throws the same error.
If I create a figure and call print(gcf, '-dmeta'), it throws the error 'Print command erroring with 'Undefined function or method 'findprop' for input arguments of type 'struct'.''
The stack that the error is thrown at is
In isprop at 40
In C:\MATLAB\R2011a\toolbox\matlab\graphics\private\postProcessPrinttables.p>postProcessPrinttables at 12
In printtables at 17 In graphics\private\inputcheck at 15 In print at 163
Anybody have ideas for settings I could have changed accidentally, or files that could have been corrupted? I've reinstalled matlab and the error does go away if I do an entirely clean reinstall, but it comes back shortly there after.
I've run
which -all findprop
with the following results,
Accepted Answer
More Answers (2)
Matt
on 21 May 2012
Walter Roberson
on 21 May 2012
0 votes
dbstop if error
run the program
look at what isprop() is trying to do, and what input is being sent to it, and where that input is coming from
dbup
look at inputcheck and what it is trying to do, where its input came from, and so on.
The usual cause of a problem like this is that you have added your own routine with the same name as one of the MATLAB library routines, so your routine is getting called instead of the MATLAB routine.
5 Comments
Matt
on 21 May 2012
Matt
on 21 May 2012
Matt
on 21 May 2012
Matt
on 21 May 2012
Walter Roberson
on 21 May 2012
Private routines still go through the same name resolution as everything else. If one of those routines happens to call upon a work routine whose name clashes with something of yours, then your routine will be called and will return results that the private routine does not expect.
Today is a holiday here and I do not have access to MATLAB today to look through the routines.
Categories
Find more on Handle Classes in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!