필터 지우기
필터 지우기

index exceeds array bounds

조회 수: 1 (최근 30일)
Chaudhary P Patel
Chaudhary P Patel 2020년 9월 30일
답변: KSSV 2020년 9월 30일
%%%%I am trying to create a programm which gets values from an excel file
for fl=1:1:dof(de,4)
for i=1:1:ne
CKx(fl)=sum(b(i)*ckx(i))./sum(b(i));
CKy(fl)=sum(c(i)*cky(i))./sum(c(i));
end
end
  댓글 수: 9
KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 9월 30일
Sir, Sure I will try
KSSV
KSSV 2020년 9월 30일
@Pramod we cannot help you unless we know your complete code and the variables.

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

답변 (1개)

KSSV
KSSV 2020년 9월 30일
m = dof(de,4) ; % I hope this is a number
ne = length(b) ; % dimensions of b and ckx, cky should be same
Ckx = cell(m,ne) ; % cell because I assume the ouput stored is array as you have used ./
Cky = cell(m,ne) ;
for fl=1:1:m
for i=1:1:ne
CKx{fl,i}=sum(b(i)*ckx(i))./sum(b(i));
CKy{fl,i}=sum(c(i)*cky(i))./sum(c(i));
end
end

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by