convert a .mat to excel file
107 ビュー (過去 30 日間)
古いコメントを表示
Hello, I have so many .mat files that I want to convert them to excel.
the first one (If I want to do one by one) name is A_Q1S1.mat.
What is the correct code for that?
4 件のコメント
Mathieu NOE
2024 年 4 月 3 日
ok , we don't need any special approach for loading your different mat files
but what we miss here is :
- what data you have stored in the mat files ,
- which elements you want to export to excel
if you could share a couple of mat files ,that would be great
回答 (1 件)
KSSV
2024 年 4 月 4 日
matFiles = dir('*.mat') ;
N = length(matFiles) ;
T = table;
for i =1:N
load(matFiles(i).name) ;
T.(i) = val ; % I assume each mat file has a variable "val" which is single column of same size
end
writetable(T,'Test.xlsx')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!