Error using load? Unable to read file

2 visualizaciones (últimos 30 días)
Hesham Ismail
Hesham Ismail el 14 de Jul. de 2015
Comentada: Hesham Ismail el 14 de Jul. de 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

Respuesta aceptada

Ingrid
Ingrid el 14 de Jul. de 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

Más respuestas (0)

Categorías

Más información sobre Software Development Tools en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by