How can I create a structure array for two files?

4 Ansichten (letzte 30 Tage)
Dhiyaa Al-Shammari
Dhiyaa Al-Shammari am 26 Mai 2020
Kommentiert: Stephen23 am 27 Mai 2020
I want to add the following into a structure array
the name of structure array is ECGData as follows
conssists of the following
How can I add the two fields(Data as a matrix array & Labels as cell array) into ECGData
  6 Kommentare
Rik
Rik am 26 Mai 2020
What is your question? You want a struct with these two fields, and you have a struct with these two fields.
Dhiyaa Al-Shammari
Dhiyaa Al-Shammari am 26 Mai 2020
Bearbeitet: Dhiyaa Al-Shammari am 26 Mai 2020
Exactly , yes I want the code like that. How can I do that ?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Rik
Rik am 26 Mai 2020
You can treat fields of a struct just like any other variable:
ECGData=struct;%create empty struct, this isn't mandatory
ECGData.Data=rand(162,65536);
ECGData.Labels=cell(162,1);
  1 Kommentar
Stephen23
Stephen23 am 27 Mai 2020
Dhiyaa Al-Shammari's incorrectly posted and accepted "answer" moved here:
Thanks a lot dear brother.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

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!

Translated by