To find the rows of data that have the same minimum and maximum values, and remove the rows.
조회 수: 6 (최근 30일)
이전 댓글 표시
I need to remove the rows that have same minimum and maximum values , below is the code used .
but it gives error:
Unable to perform assignment because brace indexing is not supported for variables of this type.
Kindly help
m = min([XTrain{:}],[],2);
M = max([XTrain{:}],[],2);
idxConstant = M == m;
for i = 1:numel(XTrain)
XTrain{i}(idxConstant,:) = [];
end
댓글 수: 10
Sindar
2020년 12월 15일
if XTrain is an array, then
XTrain{i}
is both meaningless and causing the error. Use
XTrain(idxConstant,:) = [];
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!