How I can randomly divide my data
Mostra commenti meno recenti
I have a matrix X with size nxm, How I can choose randomly 70 percent of this data and put it in matrix A and the rest in matrix B. I have already selected the 70% (according to rows) using the 'datasample' function, is there any tip to select the rest 30% of the data with there indices
[n,m]=size(X);
[A,idx] = datasample(X,round(0.7*n));
Thanks in advance for your help
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Univariate Discrete Distributions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!