I have a gui slider that calls a value from an array that gets the error 'Index in position 2 is invalid. Array indices must be positive integers or logical values.' when trying to update a textbox which causes my gui to not work.
2 次查看(过去 30 天)
显示 更早的评论
I have attached my code so you can see where it is going on. Line 96 is where the code stops working when trying to update the text with the array indices.
7 个评论
Adam
2018-6-15
Those are not necessarily integers, depending how you formatted the output. Normally an integer would not trail a load of 0s unless it has some small error a long way down the decimal places.
You can just use
doc round
if you are happy that the errors are just minor rounding errors rather than something more significantly wrong.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!