I have a matrix and a Structure array. I want to export them as an Xlsx file, with the matrix on sheet one and the Structure array on sheet two
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Joshua
am 22 Apr. 2023
Beantwortet: chicken vector
am 22 Apr. 2023
struct with fields:
W_HP: 211.85
W_LP: 244
W_P1: -1.8104
W_P2: -2.441
W_NET: 451.6
n: 0.4516
Q_condenser: -5.4628e+05
Q_heat_up: 5.2074e+05
Delta_T: 0.55665
rankine =
32.011 105 0 143.63 225 0.001005 994.99 4.1529
631.44 105 0 3699.2 225 0.001005 994.99 0
269.97 55 0.98 2757.6 225 0.0013029 767.51 0
593.03 55 0 3646.5 225 0.0013029 767.51 0
99.606 1 0.95 2562.1 225 0.0010431 958.64 0
32.011 1 0 134.15 225 0.0010431 958.64 4.1795
99.606 1 0 417.44 1928.4 0.0010431 958.64 0
179.89 10 0 762.68 1928.4 0.0011272 887.13 0
32.567 2 0 134.15 1928.4 0.0010605 942.94 0
for the Structure array I dont need the names just the values. Everything I've tried is giving errors so
0 Kommentare
Akzeptierte Antwort
chicken vector
am 22 Apr. 2023
writematrix(cell2mat(struct2cell(structName)), 'filename.xls', 'Sheet', 1);
writematrix(rankine, 'filename.xls', 'Sheet', 2);
Change structName with the name of your struct.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!