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

1 vue (au cours des 30 derniers jours)
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

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by