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

1 回表示 (過去 30 日間)
Tino
Tino 2019 年 5 月 18 日
編集済み: madhan ravi 2019 年 5 月 18 日
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 Center および File ExchangeMATLAB についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by