how to convert a numeric matrix to cell array without changing its property?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i have a training matrix A of dimension 384x4160, inorder to create labels and supply it as a input to the svmtrain function, i have converted the matrix to a cell array using the following command,
train_cell={train(1:64,:),train(65:128,:),train(129:192,:),train(193:256,:),train(257:320,:),train(321:384,:)};
it has given me a 1x6 cellarray say (B) of the following dimension,
64x4160 double 64x4160 double 64x4160 double 64x4160 double 64x4160 double 64x4160 double
As per the svm documentation the train matrix must be a numeric array, but after the conversion of matrix to cell array using the above command, the cellarray becomes non-numeric. i.e when i give
isnumeric(train_cell)
the answer is,
ans =
logical
0
Kindly, suggest me how to convert the matrix to cellarray by holding its numeric property.
0 Commenti
Risposte (1)
Jan
il 26 Dic 2017
Modificato: Jan
il 26 Dic 2017
You can't. A cell array is by definition a cell array, while only numerical arrays are numerical arrays.
As per the svm documentation the train matrix must be a numeric array, ...
Exactly. Then a conversion to a cell is not a valid option.
What is the actual problem you want to solve? What does this exactly mean: "in order to create labels and supply it as a input"?
0 Commenti
Vedere anche
Categorie
Scopri di più su Logical 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!