Dear All,
I have a file ".txt" and I want to save it to ".mat". I used this code and got this error.Please see below.
data=dlmread('RO-2013-equinox.txt');
>> save ('RO-2013-equinox.mat',data);
Error using save
Must be a string scalar or character vector.
I would appriciate to help me.

2 件のコメント

Stephen23
Stephen23 2022 年 8 月 25 日
save('RO-2013-equinox.mat','data')
% ^ ^ this needs to be the name of a variable
Ara
Ara 2022 年 8 月 25 日
編集済み: Ara 2022 年 8 月 25 日
Thank you. I wish you write in answer so that I can accept it and vote to you.

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

 採用された回答

Chunru
Chunru 2022 年 8 月 25 日

1 投票

data=dlmread('RO-2013-equinox.txt');
save('RO-2013-equinox.mat', 'data'); % quote the variable name

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Software Development についてさらに検索

タグ

質問済み:

Ara
2022 年 8 月 25 日

編集済み:

Ara
2022 年 8 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by