在 Matlab 中,如果发生错误,我怎样才能跳过某个for循环索引并跳转continue到下一个索引?请注意,我不知道哪些for循环索引会导致错误发生。
错误:Too many outputs requested. Most likely cause is missing [] around left hand side that has a comma separated list expansion
假设在 时发生错误k = 5。如何使for循环跳过索引k = 5和continueto k = 6?
for k = 1:10
do stuff
if error occurs
skip k that causes error
go to next k
end
end