Index error when using function
Mostra commenti meno recenti
I'm getting this error:
Array indices must be positive integers or
logical values.
Error in newton (line 16)
x = x - (f(x))/dx(x);
Risposte (1)
James Tursa
il 7 Mag 2019
Modificato: James Tursa
il 7 Mag 2019
0 voti
We need to see more of your code to be sure, but you likely have a variable named either f or dx that is shadowing a function of the same name. The solution is to pick a different name for this variable.
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!