How can I resolve the following index issue? Index in position 2 exceeds array bounds. Index must not exceed 4.
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, could anyone please help in resolving the following error message.
Section of the code below:
V=sqrt(P/4)*eye(4,4);
n=sqrt(Pr/trace(H*V*V'*H'+(1/snr)*eye(4,4)));
F=n*eye(4,4);
V1=V(:,1:Mu);
V2=V(:,Mu+1:2*Mu);
V3=V(:,Mu+1:3*Mu);
V4=V(:,Mu+1:4*Mu);
V5=V(:,Mu+1:5*Mu);
And this is the error message:
Index in position 2 exceeds array bounds. Index must not exceed 4.
Error in Naive_convergence (line 11)
V3=V(:,Mu+1:3*Mu);
I need to resolve the indexing of V3 to V5. V1 and V2 are fine.
댓글 수: 5
Felix Obite
2022년 11월 26일
The was designed initially for 2 users V1 and V2 and it's working perfectly. I needed to adapt for 5 users so I included V3 to V5 and got the error.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!