Error using load? Unable to read file

1 Ansicht (letzte 30 Tage)
Hesham Ismail
Hesham Ismail am 14 Jul. 2015
Kommentiert: Hesham Ismail am 14 Jul. 2015
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

Akzeptierte Antwort

Ingrid
Ingrid am 14 Jul. 2015
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

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by