How to solve Index in position 1 exceeds array bounds (must not exceed 1).

조회 수: 1 (최근 30일)
Hello,
When I am trying to run my code in matlab 2020a version I am getting this error. but when I am running the same code in matlab 2018b version, it runs normally. why am i getting this error and how can i solve this error. Please guide me.
With regards,
  댓글 수: 6

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

채택된 답변

David Hill
David Hill 2020년 6월 19일
You could always store it as a vector in the size you need it.
p0_A_SOEC_INIT_out=p0_A_SOEC_INIT_out*ones(1,size_you_need);
  댓글 수: 2
David Hill
David Hill 2020년 6월 19일
Without seeing parts of your code, I don't think I can help you further.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by