How to save ".txt" to ".mat"?
    1 回表示 (過去 30 日間)
  
       古いコメントを表示
    
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
      
      
 2022 年 8 月 25 日
				save('RO-2013-equinox.mat','data')
%                          ^    ^ this needs to be the name of a variable
採用された回答
  Chunru
      
      
 2022 年 8 月 25 日
        data=dlmread('RO-2013-equinox.txt');
save('RO-2013-equinox.mat', 'data');        % quote the variable name
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Workspace Variables and MAT Files についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


