??? Index exceeds matrix dimensions.

1 vue (au cours des 30 derniers jours)
Abdulaziz
Abdulaziz le 13 Avr 2012
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,

Réponses (2)

Geoff
Geoff le 13 Avr 2012
The variable k is either negative or is larger than the dimensions of one of a, b, c, d, or x

Jan
Jan le 13 Avr 2012
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.

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by