Error using fprintf and Error in cell2csv

filetitle = 'Global radiation: etc etc \n';
fidLILAstr = 'station-xglob.lila';
fidLILA = fopen(fidLILAstr,'wt');
I am using this command to write the information into a LILA file.
fprintf(fidLILA,'%s',filetitle);
cell2csv(fidLILAstr,csvarray);
(where csvarray shows 2x75 cells, containing 16x1 cell for station info in 1st row and 131760x1 cell for the data)
Error appears:
Error using fprintf
Function is not defined for 'cell' inputs.
Error in cell2csv (line 71)
fprintf(datei, '%s', var);
Can anyone please tell me where the problem is? Thanks :)

1 件のコメント

Geoff Hayes
Geoff Hayes 2016 年 7 月 8 日
Kanwal - I suspect the problem is because you have a cell array of cell arrays and cell2csv may not have been designed to support that. Try using http://www.mathworks.com/matlabcentral/fileexchange/25387-write-cell-array-to-text-file instead.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCell Arrays についてさらに検索

質問済み:

2016 年 7 月 8 日

コメント済み:

2016 年 7 月 8 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by