How can I create a structure array for two files?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to add the following into a structure array
the name of structure array is ECGData as follows
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/302013/image.png)
conssists of the following
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/302018/image.png)
How can I add the two fields(Data as a matrix array & Labels as cell array) into ECGData
6 Commenti
Rik
il 26 Mag 2020
What is your question? You want a struct with these two fields, and you have a struct with these two fields.
Risposta accettata
Rik
il 26 Mag 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 Commento
Stephen23
il 27 Mag 2020
Dhiyaa Al-Shammari's incorrectly posted and accepted "answer" moved here:
Thanks a lot dear brother.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Structures in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!