Error using load? Unable to read file

2 次查看(过去 30 天)
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by