multiple arrays to one text file

2 ビュー (過去 30 日間)
Debbie Oomen
Debbie Oomen 2017 年 11 月 2 日
回答済み: BhaTTa 2024 年 10 月 23 日
header1= 'Name file';
header2='Median frequencies of MVCs';
outputFile1 = fopen(fullfile(mydir1,'Results.txt'),'w');
fprintf(outputFile1, '%-32s%32s\n', 'Name file', 'Median frequencies of MVCs ' )
fprintf(outputFile1,'%-32s%32s\n', filename, Medianfreq)
filename is a structure (3x1) and Medianfreq is a number array. The Medianfreq is correctly exported to a txt file but I can not seem to get the structure in there. Also, i want these two variable next to each other like this:
filename1 30 filename2 31 filename3 87
And this for all of my filenames and median frequencies. How can I do this? Please help!

回答 (1 件)

BhaTTa
BhaTTa 2024 年 10 月 23 日
Please refer to the below MATLAB Answer :

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by