【发布时间】:2016-09-16 09:49:21
【问题描述】:
我正在 matlab 中编写以下代码:
m=unique(x);
for i=1:length(m)
%some code that increase the number of unique values in x
.......
.......
%here I tried to update m
m=unique(x);
end
虽然我已经通过在 for 结束之前写下这行 m=unique(x); 来更新 m,但 for 循环的限制仍然具有相同的旧值。我需要动态更新 for 循环的限制。那可能吗?如果可以,怎么做?
【问题讨论】:
标签: matlab for-loop limit updates