Convert a 1x1 cell to a .dat file

2 ビュー (過去 30 日間)
Richard Wood
Richard Wood 2020 年 5 月 14 日
回答済み: Ameer Hamza 2020 年 5 月 14 日
Hello everyone
I am trying to do, probably, a very simple task. Actually, I have in my workspace a variable called 'sol', which is a 1x1 cell, on which there is 801x2 double elements. What I want to do is to save the two columns of this cell element in a .dat file.
The first elements of the cell looks like this
Any idea?

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 14 日
Several options
writematrix(sol{1}, 'myData.dat'); % R2019a and later
writecell(sol, 'myData.dat'); % R2019a and later
dlmwrite('myData.dat', sol{1}); % earlier releases.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by