how to convert a numeric matrix to cell array without changing its property?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Jan
2017년 12월 26일
편집: Jan
2017년 12월 26일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Detection에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!