Without using the built in function "mean" (Matlab)

10 visualizaciones (últimos 30 días)
Cristian Pablo Jimenez
Cristian Pablo Jimenez el 3 de Nov. de 2017
Respondida: Image Analyst el 3 de Nov. de 2017
How would I be able to calculate the mean of row i of a matrix "A" without using the built in function "mean"?

Respuestas (1)

Image Analyst
Image Analyst el 3 de Nov. de 2017
Just loop over columns
theSum = 0;
for col = 1 : columns
theSum = theSum + m(i, col);
end
theMean = theSum / columns;
That's really super basic programming.

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by