[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using cell2csv
From: |
Terry Duell |
Subject: |
Re: Using cell2csv |
Date: |
Wed, 12 Jun 2013 07:28:18 +1000 |
User-agent: |
Opera Mail/12.15 (Linux) |
On Wed, 12 Jun 2013 01:30:20 +1000, seektime <address@hidden>
wrote:
If your array isn't too large once your loop has finished you could
write it
to file using cell2csv in one sweep. That's how I use this function. But
then again, I'm sure you though about that already.
Yes, I did try that, but that failed.
I get ...
warning: cell2csv: empty cell or not a real or a string value - converted
to 'NaN'
warning: cell2csv: empty cell or not a real or a string value - converted
to 'NaN'
and just two NaNs in the file.
As I think I mentioned earlier, my understanding of cell array indexing is
a bit poor, so have tried a few ways of doing this, all to no avail. The
usage that brought about the above result is as follows...
cell2csv("Myresults.csv", datavals);
For this particular test, datavals is structured as follows (with a few
edits of content)...
datavals =
{
[1,1] =
{
[1,1] = filename
[1,2] = header
[1,3] = header
[1,4] = header
[1,5] = header
[1,6] = header
[1,7] = header
[1,8] = header
[1,9] = header
[1,10] = header
}
[1,2] =
{
[1,1] = name1
[1,2] = 9
[1,3] = 4
[1,4] = 2
[1,5] = 2
[1,6] = 28
[1,7] = 1
[1,8] = 3
[1,9] = 15
[1,10] = 9.3
}
}
and for a full run through of the data would have size = 1,9
Does any of that provide any clues as to how it might be writ, as separate
records, in one go?
Cheers,
--
Regards,
Terry Duell