Subscript indices must either be real positive integers or logicals.

조회 수: 1 (최근 30일)
irfan
irfan 2016년 7월 1일
댓글: Walter Roberson 2016년 7월 2일
k_est=k_p(bb,:);
XF_est=xf(bb).XF;
num_2=num_2+1;
kkk2(num_2,:)=k_est;
for iii=1:length(k_est)
X_re(k_est(iii))=XF_est(iii);
end
what is the problem in my four loop

답변 (1개)

Star Strider
Star Strider 2016년 7월 1일
What is k_est and what is its size (what are its dimensions)?
  댓글 수: 2
irfan
irfan 2016년 7월 2일
1*2 complex double and xf_est dimensions is 2*1 complex double
Walter Roberson
Walter Roberson 2016년 7월 2일
If k_est is a complex double, then how can you use it to index X_re in your statement
X_re(k_est(iii))=XF_est(iii);
??
Are you trying to define a "formula", sort of like a definition that for function f,
f(sqrt(2)) = 4.1293;
f(3.5) = 7.893;
?? If you are, then that is not possible in MATLAB, except in the case of a symbolic function being defined.

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

카테고리

Help CenterFile Exchange에서 Array Geometries and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by