Am getting the error ' Array indices must be positive integers or logical values.

조회 수: 1 (최근 30일)
hi
Find the following code below
kiki = 2;
xander = 1/n * h1 (sum(kiki * (([m{:}] - numel(Test)/h1))));
I am getting the following error
Array indices must be positive integers or logical values.
Kindly help
Thanks in advance
Tino

채택된 답변

madhan ravi
madhan ravi 2019년 5월 18일
편집: madhan ravi 2019년 5월 18일
xander = 1/n * h1 * (sum(kiki * (([m{:}] - numel(Test)/h1))));
% ^ missed
  댓글 수: 5
madhan ravi
madhan ravi 2019년 5월 18일
I can’t read your mind Tino as suggested try .* , if not tell what the size of the variables are.
Tino
Tino 2019년 5월 18일
편집: madhan ravi 2019년 5월 18일
Thanks Madhan
Already implemented it with
xander = mean(phi.* (([m{:}]-numel(Test)/h1)/h1));
Regards
Tino

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by