It is showing the error 'arrays indices must be positive integers or logical values'. The code and the pic of error attached with this question. thank you.

3 次查看(过去 30 天)
kindly help me with this code. it is not showing any error in my system but also it is not showing any results. And, sometimes it shows error (pic of that image is attached).

采纳的回答

James Tursa
James Tursa 2018-9-28
编辑:James Tursa 2018-9-28
For the error, you can debug by typing the following at the command line and running your code:
dbstop if error
When the error occurs, the program will pause at the offending line will all variables intact. You can then examine the variables to see why they are not what you expected. Maybe j is not a positive integer >= 2, or maybe you inadvertently created a variable with the name "abs" and v is not a positive integer. Etc.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Function Creation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by