필터 지우기
필터 지우기

I have this error messege when saving a figure

조회 수: 2 (최근 30일)
Saed
Saed 2011년 12월 31일
When I try to save a figure, the follwoing messege appears in the command window, and it does not save the figure. Why?
The messege:
??? Java exception occurred: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 4
at java.util.Vector.get(Unknown Source)
at javax.swing.plaf.basic.BasicDirectoryModel.getElementAt(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.getCellBounds(Unknown Source)
at javax.swing.JList.getCellBounds(Unknown Source)
at javax.swing.JList.ensureIndexIsVisible(Unknown Source)
at sun.swing.FilePane.ensureIndexIsVisible(Unknown Source)
at sun.swing.FilePane.ensureFileIsVisible(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.ensureFileIsVisible(Unknown Source)
at javax.swing.JFileChooser.ensureFileIsVisible(Unknown Source)
at javax.swing.JFileChooser.setSelectedFile(Unknown Source)
at com.mathworks.mwswing.MJFileChooserPerPlatform.setSelectedFile(MJFileChooserPerPlatform.java:377)
Error in ==> AbstractFileDialog.AbstractFileDialog>AbstractFileDialog.setPeerCurrentFile at 172 obj.Peer.setSelectedFile(java.io.File([aPathName, filesep], aFileName));
Error in ==> UiFileSaveDialog.UiFileSaveDialog>UiFileSaveDialog.show at 30 setPeerCurrentFile(obj);
Error in ==> uitools\private\uigetputfile_helper at 46 ufd.show();
Error in ==> uiputfile at 110 [filename, pathname, filterindex] = uigetputfile_helper(1, varargin{:});
Error in ==> filemenufcn>localSaveExport at 284 [newfile, newpath, typevalue] = uiputfile(filter, 'Save As',filename);
Error in ==> filemenufcn at 55 localSaveExport(hfig)
??? Error using ==> filemenufcn(gcbf,'FileSaveAs') Java exception occurred: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 4
at java.util.Vector.get(Unknown Source)
at javax.swing.plaf.basic.BasicDirectoryModel.getElementAt(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.getCellBounds(Unknown Source)
at javax.swing.JList.getCellBounds(Unknown Source)
at javax.swing.JList.ensureIndexIsVisible(Unknown Source)
at sun.swing.FilePane.ensureIndexIsVisible(Unknown Source)
at sun.swing.FilePane.ensureFileIsVisible(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.ensureFileIsVisible(Unknown Source)
at javax.swing.JFileChooser.ensureFileIsVisible(Unknown Source)
at javax.swing.JFileChooser.setSelectedFile(Unknown Source)
at com.mathworks.mwswing.MJFileChooserPerPlatform.setSelectedFile(MJFileChooserPerPlatform.java:377)
??? Error while evaluating uimenu Callback
Thanks in advance
  댓글 수: 4
Saed
Saed 2011년 12월 31일
Ok, I update the java on my computer, and now it is working just fine. Thanks
Saed
Saed 2011년 12월 31일
Oh Oh, it is back gain!!

댓글을 달려면 로그인하십시오.

답변 (5개)

Jose Jeremias Caballero
Jose Jeremias Caballero 2011년 12월 31일
clear all
A=imread('ngc6543a.jpg');
for i=1:5
imwrite(A,['grafica',num2str(i),'.tif']);
end
  댓글 수: 3
Image Analyst
Image Analyst 2012년 1월 1일
Don't worry about it. You already had said that you solved your problem by updating Java.
Jan
Jan 2012년 1월 1일
@Jose: What are you talking about?

댓글을 달려면 로그인하십시오.


Jose Jeremias Caballero
Jose Jeremias Caballero 2012년 1월 1일
copy and paste it into the matlab command window.
and see what this code.

Jose Jeremias Caballero
Jose Jeremias Caballero 2012년 1월 1일
Look at the current directory where to store the files created by the user. there should appear a number of figures created.
  댓글 수: 1
Saed
Saed 2012년 1월 1일
What are these figures? and how these can help solving the problem?
Thanks

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2012년 1월 1일

Image Analyst
Image Analyst 2012년 1월 1일
Saeed: Are you still having the Java problem? Or do you just want to save files? See the FAQ http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
  댓글 수: 4
Saed
Saed 2012년 1월 4일
can not I save it from the command window or something like that?
Walter Roberson
Walter Roberson 2012년 1월 4일
You can try print() or saveas()

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by