Skip reading strings in matlab

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-03-26T18:52:01Z Indexed on 2010/03/26 19:03 UTC
Read the original article Hit count: 109

Filed under:

Is there is easy command in matlab which prevents program from crashing when it reads characters?

I use xlsread to read a (20 400) matrix data , the first row and column get disregarded as they have headers, so that:

data = xlsread ( ' C:\file.xls') 

results in data with a size of (19 399).

I have a problem, some cells have missing data and it's written ' missing' and on some data sets i have headers reappear in middle.

Is there a way to skip these characters without the program crashing and me having to open the file in excel and deleting those fields?

Thanks

© Stack Overflow or respective owner

Related posts about matlab