×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

restarting a matlab app automatically if it fails

restarting a matlab app automatically if it fails

restarting a matlab app automatically if it fails

(OP)
My matlab app processes a bunch of files and if it hits a bad file it fails and stops. I would like it to restart itself after it comments out the offending file. so I would like to know how I can get notified that the app has failed (stopped).
thanks,
sb

RE: restarting a matlab app automatically if it fails

Bonosa,

Is the bad file bad because it is corrupted or because it doesnt meet certian criteria in the process scheme?

You could run an initial check/process that would decide whether a file was bad or not. With that info you can then jump back to before the process loop and remove it from the file list that is being passed to the process loop and start all over again...

  
How to get around it really depends on why it is being tagged as bad.

But my feeling is that the app stops because you are arriving at an end before something that would edit the file list and begin the process again.

Hope this helps some... else supply more info :)

BSK

RE: restarting a matlab app automatically if it fails

(OP)
I'm working on a try catch, and when it errors (in the catch block) it reads the m file (with the list of files in it) upto the 'bad' file...discards all these, then writes another m file with the remaining unprocessed file and launches this new file.Thats my idea...

BTW when you do an eval('fcn') you can also do eval('fcn','backupfcn') where backupfcn runs if fcn errors out.
Had some troubles changing directories, so will do the try catch instead and see.
thanks for taking the time to respond,
sb

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources