How to add certain elements of an array
조회 수: 2 (최근 30일)
이전 댓글 표시
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
MaHa
2020년 8월 25일
Convert your -60 values into NaNs :
noSignal = find(A == -60);
A(noSignal = NaN);
Then do your addition
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ultrasound Imaging에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!