use of eval in loop, Index exceeds matrix dimensions.
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have 250 decision trees in a dataset called c1 .. c250
I am trying to use the isbranch function in a loop.
This is the code:
for i = 1:250
STR = sprintf('isbranch(c%d)',i);
branches = eval(STR);
end;
I used eval before to use these trees, and no error was showing then. Now I keep getting the error:
Index exceeds matrix dimensions.
Any suggestions would be welcome.
Thanks,
Michiel
4 个评论
回答(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!