Filter löschen
Filter löschen

help with structuring variables

1 Ansicht (letzte 30 Tage)
sri satya ravi
sri satya ravi am 22 Feb. 2017
Kommentiert: sri satya ravi am 22 Feb. 2017
hi;
I have 10 variables or so and want to create a structure at the end of my code for those variables. I tried this s = struct ('continous_emissions',[final_m_co2_g_sec,final_m_co_g_sec, final_m_thc_g_sec, final_m_no_g_sec, final_m_no2_g_sec, final_m_nox_g_sec]); but i get one structure with all length 1200*6. I want to have them as continous_emissions.final_m_co2_g_sec,continous_emissions.final_m_co_g_sec and so all.....not all in one.
Any ideas??

Akzeptierte Antwort

James Tursa
James Tursa am 22 Feb. 2017
Like this?
continous_emissions = struct('final_m_co2_g_sec',final_m_co2_g_sec,...
'final_m_co_g_sec',final_m_co_g_sec,...
etc);

Weitere Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by