How to add certain elements of an array
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alan Keenan
el 25 de Ag. de 2020
Comentada: Alan Keenan
el 25 de Ag. de 2020
I have two 200 x 200 arrays of pixel values.
They are all negative values representing -dB values
All of the signal pixel values are >= -20.
All other pixel values (no signal) have been forced to -60.
I want to add both arrays so that only the signal pixels are added to have a summated signal intensity.
This relates to TFM imaging in Ultrasonics.
2 comentarios
MaHa
el 25 de Ag. de 2020
Convert your -60 values into NaNs :
noSignal = find(A == -60);
A(noSignal = NaN);
Then do your addition
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Ultrasound Imaging 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!