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 Center および File ExchangeSoftware Development Tools についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by