フィルターのクリア

How to save ".txt" to ".mat"?

2 ビュー (過去 30 日間)
Ara
Ara 2022 年 8 月 25 日
編集済み: Ara 2022 年 8 月 25 日
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 日
data=dlmread('RO-2013-equinox.txt');
save('RO-2013-equinox.mat', 'data'); % quote the variable name

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by