How can I convert a .txt file to .mat file?
102 ビュー (過去 30 日間)
古いコメントを表示
I have a one dimensional input of floating point values which should be converted to a .mat file. How can i do it?
Example 0.453 0.987 0.7675 0.3478 0.1256 etc....
Is there a possibility of converting it to a .mat file? The .mat file should be usable in simulink.
1 件のコメント
bilal amjad
2018 年 7 月 24 日
>> data=importdata('Traindata_0.txt');
>> save('Traindata_0', 'data');
where ('Traindata_0.txt') is my text file containing very large data save ftn save it in .mat file
回答 (2 件)
Guillaume
2015 年 1 月 28 日
M = dlmread('somefile.txt'); %Use a better name that M
save('somefile.mat', M);
3 件のコメント
Momin Shariff
2022 年 6 月 8 日
M = dlmread('somefile.txt'); %Use a better name that M
save('somefile.mat', M);
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!