Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How to calculate the mean of an image if I want to delete some value?
조회 수: 2 (최근 30일)
이전 댓글 표시
the picture above show the value of my picture
I don't know how to calculate the mean of all value if I don't want the value that >185
I must use what code?
Help me please TT
댓글 수: 0
답변 (1개)
madhan ravi
2019년 1월 17일
편집: madhan ravi
2019년 1월 17일
matrix=double(matrix); % where matrix is the matrix of which you are trying to calculate the mean of
matrix(matrix>185)=NaN;
Result=mean(matrix(:),'omitnan') % mean along all dimensions
result=mean(a,1,'omitnan') % mean along columns
result=mean(a,2,'omitnan') % mean along rows
result(~isnan(result)) % to omit NaN values from the result
댓글 수: 2
madhan ravi
2019년 1월 17일
편집: madhan ravi
2019년 1월 17일
Anytime :) , if it was what you were looking for make sure to accept the answer.
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!