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

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

 Respuesta aceptada

madhan ravi
madhan ravi el 18 de Mayo de 2019
Editada: madhan ravi el 18 de Mayo de 2019
xander = 1/n * h1 * (sum(kiki * (([m{:}] - numel(Test)/h1))));
% ^ missed

5 comentarios

Thanks Madhan
what about this
Array indices must be positive integers or logical values.
Error in Givu (line 46)
xander = mean(phi(([m{:}]-Test)/h1)/h1);
Thanks you in advance
Tino
Thanks Madhan
I am getting this error below
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of
columns in the first matrix matches the number of rows in the second matrix.
To perform elementwise multiplication, use '.*'.
Error in Givu (line 46)
xander = mean(phi * (([m{:}]-Test)/h1)/h1);
I can’t read your mind Tino as suggested try .* , if not tell what the size of the variables are.
Thanks Madhan
Already implemented it with
xander = mean(phi.* (([m{:}]-numel(Test)/h1)/h1));
Regards
Tino

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Large Files and Big Data en Centro de ayuda y File Exchange.

Productos

Versión

R2019a

Etiquetas

Preguntada:

el 18 de Mayo de 2019

Editada:

el 18 de Mayo de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by