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

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