MATLAB Answers

Index in position 1 exceeds array bounds (must not exceed 2).

조회 수: 5(최근 30일)
Jay 26 Jul 2020
편집: Jay 27 Jul 2020
이 질문에 1명의 참여자가 플래그를 지정함

  댓글 수: 2

KSSV 26 Jul 2020
You will get this error when you try to extract more number of elements than present in the array. Check your To, it is of size 2*1 and you might be trying to extract To(3). Check your intialization.

댓글을 달려면 로그인하십시오.


Matt J
Matt J 26 Jul 2020
How can To(t,1) make sense when t becomes greater than 2? To is only a length 2 vector.

  댓글 수: 3

Image Analyst
Image Analyst 26 Jul 2020
Put in comments so we can understand what you did. Often when you do that you'll discover the error on your own. But at least then, if you still haven't found it, we'll have a chance at understanding what you did and what you want.
Matt J
Matt J 26 Jul 2020
what can I do?
You should make sure To and other vector are the correct length.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by