Reputation: 301
I have a table gTruth.LabelData and have a column called X. I want to iterate over the elements of the column X of the table, and write it into a csv file. How to do it?
The variables in each cell of the X column is of type double
like [3 15 26 38;62 9 19 4]
.
Upvotes: 0
Views: 65
Reputation: 478
L = size(X,2) % number of column
for i=1:L
valX = X(:,i)
xlswrite('MyFile.xlsx',valX)
end
Upvotes: 1