??? Index exceeds matrix dimensions.
1 次查看(过去 30 天)
显示 更早的评论
Hi guys, I do not know why I receive this error when I reach this equation in my code. ??? Index exceeds matrix dimensions. the equation is: S(k)= a(k) + b(k)*(X-x(k)) + ((X-x(k))^2)*c(k) + ((X-x(k))^3)*d(k) ; Best,
0 个评论
回答(2 个)
Geoff
2012-4-13
The variable k is either negative or is larger than the dimensions of one of a, b, c, d, or x
0 个评论
Jan
2012-4-13
The standard method to solve this is:
dbstop if error
Then Matlab stops, when the error occurs, and you can inspect the values of the local variables e.g. in the command window.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!