How to save fields of a struct through for loop iteration.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Habtamu Tesfaw
am 16 Mai 2020
Kommentiert: Habtamu Tesfaw
am 18 Mai 2020
I have a struct with several field names.
data=
struct with fields:
'a': [100×1 double]
'b': [400×1 double]
.
.
etc.
I can save all the filed values to the same file as follow.
save(filename, 'a', 'b', ...)
but, since the field name are too many, I want to to save all of them by for loop. Is there any way I can do that? Thank you!
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Structures 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!