필터 지우기
필터 지우기

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.

조회 수: 1 (최근 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
Thomas Firsich
Thomas Firsich 2018년 6월 15일
I am getting now just a weird error at certain values of the slider...4,6,7,8,9,etc...I am attaching the error and proof that the slider values are integers before it is passed on to the function.
Adam
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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by