I have numerous csv files generated from various tests that I have conducted. The issue is that these csv files contain strings as well as numbers. I want to extract an entire column from this file.
I have looked at several solutions but nothing seems to work and also I am new to MATLAB. So can someone kindly take a look at it.
No products are associated with this question.
Are you using R2012b?
If so - use the Import Wizard. Click "Import Data" on the home tab and if the *.csv file has any structure, it will parse it for you.
There seems to be no capability to skip rows in csvread() or dlmread() unless the skipped rows have the same format as the numerical table below the rows. So it appears that it can't handle skipping header lines with arbitrary strings on them. This would be a nice, and I think an easy to add, upgrade that many people have been wanting for a long long time. If you want, you could easily write your own to get certain lines, write them out to a temporary file, call csvread on that temporary file, then delete the temporary file. In the meantime you may have to read lines yourself with fgetl() and parse with textscan() or sscanf().
I would say that you must read the file in two steps
The format string "must" be generated automatically, which can be done in the first step. Reading the file twice has a minor effect on the performance if it fits in the system cache.
I guess that few if any tools in the File Exchange handles footers