How to split data of a .mat file into trainH trainY testH testY as shown in picture

9 visualizzazioni (ultimi 30 giorni)
  8 Commenti
uma il 9 Mar 2022
Modificato: Stephen23 il 10 Mar 2022
I have a .mat file dataset containg four variables trainH you can see in the above picture. Now want these fours variables in another dataset in the same way...may be this is done in the CSV file.
I have attached both my .csv and .mat dataset I just want something like this
struct with fields:
trainH: [1000×9 double]
trainY: [1000×1 double]
testH: [473×9 double]
testY: [473×1 double]

Accedi per commentare.

Risposta accettata

Arif Hoq
Arif Hoq il 9 Mar 2022
My guess:
1st step: load your cmc.mat file in Variable A as a struct.
2nd step: extract your 4 variables from struct A.
trainH=A.trainH ;
  9 Commenti

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by