when i execute a training file i get the below error;
??? Error using ==> imread at 359
Can't open file "Face Granules\FGr13.jpg" for reading;
you may not have read permission.
Error in ==> Training at 105
After getting the above error if i click any m-file i get the below error
??? C:\Program Files\MATLAB\R2009b\toolbox\matlab\uitools\uiopen.m: Too many files open;
check that FILES = 20 in your CONFIG.SYS file.
then i need to close matlab and open it again... the training is getting failed due to this error... please can someone help me to solve this error

 채택된 답변

Thorsten
Thorsten 2015년 3월 27일

1 개 추천

You don't have to close Matlab, just
close all
Probably you have opened files using fopen, and forgot to close them using fclose?

댓글 수: 4

i used
close all
but still i had that error...
i had used fopen... let me check with fclose and i'll reply...
I think he meant:
fclose('all')
But this only closes files that were opened in MATLAB, not by any of your other programs.
thank you all... it worked fine with
fclose('all');
Image Analyst
Image Analyst 2015년 3월 28일
I think that's somewhat dangerous unless you know what is open. I think you should open and close each file individually. That's the cleanest way to do it. If you just blindly call fclose('all') then it's possible that you might close something you did not intend to. That's why it's better to close each file independently and close it when it makes sense to close it, not just at some arbitrary time later, blindly, and with a sledgehammer.

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

추가 답변 (1개)

Image Analyst
Image Analyst 2015년 3월 27일

1 개 추천

Does the file even exist? Try this
if exist('Face Granules\FGr13.jpg', 'file')
uiwait(helpdlg('File exists'));
else
uiwait(warndlg('File does not exist on the search path!'));
end

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

질문:

2015년 3월 27일

댓글:

2015년 3월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by