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 个评论
NN
NN 2020-12-12
编辑:NN 2020-12-12
Still brace indexing error is getting for the for loop
Unable to perform assignment because brace indexing is not supported for variables of this type.
m = min(XTrain,[],2);
M=max(XTrain,[],2);
idxConstant = M == m;
for i = 1:numel(XTrain)
XTrain{i}(idxConstant,:) = [];
end

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by