How do I make an average of points ?
Mostrar comentarios más antiguos
Hi, say I have an 11*10 matrix and for every point in the 6th row, I want matlab to take an average of the surrounding points and make a new row; ie 1 point has 8 surrounding points then the same for each point in the row, how would this be done please ? Thanks
2 comentarios
jonas
el 22 de Ag. de 2018
Please provide an example with input and desired output
Ernest Adisi
el 22 de Ag. de 2018
Respuesta aceptada
Más respuestas (1)
Yuvaraj Venkataswamy
el 22 de Ag. de 2018
Editada: Yuvaraj Venkataswamy
el 22 de Ag. de 2018
Check this,
if true
X = rand(11,10);
k = 6;
MA = movmean(X,[(k-1) 0]);
Y = MA(k:k:end,:);
end
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!