Error at open 163 again (trying to open a figure)
Afficher commentaires plus anciens
Hey there!
I get a weird error. Before, I plotted a graph and saved the figure and afterwards, I could open it without any problems.
modeprob = figure;
save('mode_probabilities.fig','modeprob');
Since some time now, when I try to open these files, I get Error using ==> open at 163 on PC and Error using ==> open at 162 on Mac
I still can open the old files that I saved this way, but not any new files that I saved this way. If I save the figure by clicking 'save' through the GUI it works fine.
I am aware of this thread and I do not have anything new in the path. True, I did download some external toolboxes, but I removed them and I even restored the 'default' path. Now when I use which -all message
I get the same thing that the "best answer" guy got. I tried moving those four to the end but didn't help. Any ideas?
Thanks!
Réponse acceptée
Plus de réponses (1)
Riemanns world
le 19 Juil 2013
Thanks for pointing to hgsave. I was able to open a stubborn figure using hgload. Don't know if that would have worked in this situation.
I had a figure that wouldn't open and returned an error using using open (line 163). I tried to open it using the right click option "Open in GUIDE" and got both a series of command line errors (pasted below) and a dialog box of errors.
I was able to open the figure using hgload, and discovered that the figure somehow saved with two legends. I deleted one and can now open the file normally.
java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.String;
at com.mathworks.toolbox.matlab.guide.LayoutEditor.completed(LayoutEditor.java:2218)
at com.mathworks.toolbox.matlab.guide.LayoutEditor$ReadFigureCompleted.completed(LayoutEditor.java:3049)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:55)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.MatlabWorker.start(MatlabWorker.java:248)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.start(LayoutWorker.java:70)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.fevalConsoleOutput(LayoutWorker.java:41)
at com.mathworks.toolbox.matlab.guide.LayoutLooper.readFigure(LayoutLooper.java:712)
at com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:2015)
at com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1978)
1 commentaire
Le Thi Khuyen
le 23 Mai 2016
I've tried to open a figure by using hgload, but in the command Window, it appears
Attempt to reference field of non-structure array.
Error in union (line 8) if g1.directed ~= g2.directed
Error in hgloadStructDbl>figload_reset (line 360) axlist = union(axlist,allChil);
Error in hgloadStructDbl (line 141) figload_reset(hFigures(i));
Error in C:\Program Files\MATLAB\R2012b\toolbox\matlab\graphics\hgload.p>hgload (line 68)
Could you tell me how can I do to troubleshoot this, please!
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!