help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to write cell array to csv file


From: Terry Duell
Subject: How to write cell array to csv file
Date: Wed, 17 Oct 2012 15:44:54 +1100
User-agent: Opera Mail/11.64 (Linux)

Hullo All,
I am having trouble writing out the contents of a cell array to a csv file.
I have a string variable and a number of numeric variables that I have put into a cell, eg

datacsv = { string1, T1, T2, T3}

I then want to write the cell out to a csv file, eg

csvwrite('testcsv', datacsv)

and I get the error...
error: fprintf: wrong type argument `cell'

I have been having a bit trouble figuring out how best to tackle this, and initially tried putting all the data into a normal array, eg

datacsv = [string1, T1, T2, T3]

and this approach wrote data to the csv file but it was incomprehensible, so attempted the cell array approach.

Is there a way of writing out mixed string and numeric data in the one csv record? If so could some one please point me in the right direction.

Apologies if my terminology is not correct.


Cheers,
--
Regards,
Terry Duell


reply via email to

[Prev in Thread] Current Thread [Next in Thread]