Error using load? Unable to read file

조회 수: 1 (최근 30일)
Hesham Ismail
Hesham Ismail 2015년 7월 14일
댓글: Hesham Ismail 2015년 7월 14일
Hello,
I have a question about load file. for example load laserdata and laserdata file is not there is there a way to return 0? for no file exist rather than error? I tried exist function in matlab but no luck?
Any help will be great

채택된 답변

Ingrid
Ingrid 2015년 7월 14일
you could use a try - catch block
try
load laserdata
catch
% write whatever code you want to be executed if the laserdata cannot be loaded
end
  댓글 수: 1
Hesham Ismail
Hesham Ismail 2015년 7월 14일
Thanks, I test it out work nicely

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by