How to save work space variables in excel with two more lines: names and unit
1 回表示 (過去 30 日間)
古いコメントを表示
I'd like to save the output of my code as txt or xlsx file. What I don't manage to do is adding two more lines with names and units. Could someone help me out?
The output of my code are 22x1 doubles and I'd like to save it all in the same file.
%% Output parameters
T1 = [A; T1]; % Table 1: beta,st for each iteration step
T2 = [B; T2]; % Table 2: d_ch for each iteration step
T3 = [C; T3]; % Table 3; q_ch_max for each iteration step
T4 = [D; T4]; % Table 4; q_ch_mt for each iteration step
T5 = [E; T5]; % Table 5; q_vol for each iteration step
T6 = [F; T6]; % Table 6; q_reg for each iteration step
T7 = [G; T7]./0.9; % Table 7; q_inc for each iteration step
T8 = [H; T8]; % Table 8; q_loss for each iteration step
T9 = [T1, T2(:,2)] % Table 9; beta,st and d_ch for each iteration step
T10 = [T7,T8(:,2),T5(:,2),T3(:,2),T4(:,2),T6(:,2)] % Table 10; heat flux rates
0 件のコメント
回答 (1 件)
Anagha Mittal
2021 年 6 月 28 日
Hi Delia, you may try the command
save(filename,variables,fmt)
filename: The name of your Matlab file
variables: the list of variables you want to save
fmt: format of the file, for example for saving it as text you can write '-ascii'
For more info, check this out: https://www.mathworks.com/help/matlab/ref/save.html#btox10b-1-variables
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で MATLAB Report Generator についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!