How to get average of an array except considering the last element of the array
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Md
el 2 de Feb. de 2017
Comentada: Walter Roberson
el 28 de Dic. de 2017
I would like to get the average of an array without considering the last element of the array.
Thanks in advance.
Respuesta aceptada
Andrei Bobrov
el 2 de Feb. de 2017
Let A - your double array
B = A(:);
out = mean(B(1:end-1));
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Types en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!