Index exceeds matrix dimensions
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hello,
I keep getting this error for one of matrices that is in an if loop. I checked the size of the matrix and it is the same size as the for loop limits that the if loop is called in, so I can't figure out how it's trying to access an index that's greater than the size of the matrix.
In the code below the error is happening at the line that calls Rs_Rc(ii,kk) in the if loop, but I've doubled checked and the size of that matrix is the same as the for loop limits. Even the size of the Rc and Rs matrices used to compute Rs_Rc are the same. Please help!
for ii = 1:Z-1
for kk = 1:(N_ofRibs-1)*5
Rc(ii,kk) = sigma_panelbending(ii,kk)/compression_crit(ii,kk);
Rs(ii,kk) = tau_panelshear(ii,kk)/tau_crit(ii,kk);
Rs_Rc(ii,kk) = Rs(ii,kk)^1.5 + Rc(ii,kk);
if Rc(ii,kk) <= 1 && Rs(ii,kk) <= 1 && ...
Rs_frontspar(1,kk) <= 1 && Rb_frontspar(1,kk) <=1
if Rs_Rc(ii,kk) <= 1 && Rb_Rs_frontspar(1,kk)...
&& Rb_Rs_rearspar(1,kk)
if stringer_failure <= 1
Thanks!
댓글 수: 0
답변 (1개)
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!