Effacer les filtres
Effacer les filtres

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 vue (au cours des 30 derniers jours)
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

Réponse acceptée

chicken vector
chicken vector le 22 Avr 2023
writematrix(cell2mat(struct2cell(structName)), 'filename.xls', 'Sheet', 1);
writematrix(rankine, 'filename.xls', 'Sheet', 2);
Change structName with the name of your struct.

Plus de réponses (0)

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by