From: Morgan Fox on 19 Jul 2010 13:55 I am running a for loop which analyzes all files in a folder. Some of the files have messy data and return an error. Rather than go through and manually figure out which ones don't work, is there a way for the code to simply recognize the error and move on to the next file? Thanks.
From: dpb on 19 Jul 2010 14:02 Morgan Fox wrote: > I am running a for loop which analyzes all files in a folder. Some of > the files have messy data and return an error. Rather than go through > and manually figure out which ones don't work, is there a way for the > code to simply recognize the error and move on to the next file? doc catch doc try --
From: Walter Roberson on 19 Jul 2010 14:10 Morgan Fox wrote: > I am running a for loop which analyzes all files in a folder. Some of > the files have messy data and return an error. Rather than go through > and manually figure out which ones don't work, is there a way for the > code to simply recognize the error and move on to the next file? Possibly: if it fails out using error() then you can detect that and continue gracefully using a try/catch block.
|
Pages: 1 Prev: Need to read large video files into Matlab Next: Differential Equation with Matrix Inputs |