Index exceeds array dimensions. Index value 7 exceeds valid range [1-6] for array 'u'. Error in 'control/MATLAB Function' (line 8) y=u(row,:);
1 次查看(过去 30 天)
显示 更早的评论
i would out of function is 0 in 6 out all time when theta_array is empty or first colloum is [0,0,0,0,0,0]
function y = fcn(u)
persistent row
if isempty(row)
row=0;
end
row=row+1;
y=u(row,:);
end
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1165653/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1165658/image.png)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!