How to calculate and plot this pcolor plot?

Hi, I have a 3D matrix of 1100x800x764 size. This forms a 1100 by 800 grid cell with 764 different samples.
I want to calculate every single grid cell's mean value to create a 2D mean 1100x800 grid cell. The pcolor plot should satisfy this condition -
It means, every pixel's mean value should be greater or equal than the ratio of the standard deviation of that pixel and the root of the sample size (N = 764). Any pixel that does not confirm this condition will automatically be set as NaN. Rest of the pixels should be pcolor mapped :)
Any feedback from you will be much appreciated!!

 채택된 답변

KSSV
KSSV 2023년 5월 25일

1 개 추천

A = rand(1100,800,764) ;
mu = mean(A,3) ;
sigma = std(A,[],3) ;
idx = mu >= sigma/sqrt(764) ;
h = pcolor(idx) ;
h.EdgeColor = 'none' ;

댓글 수: 7

What happens if there are already some NaN values present in the A?
KSSV
KSSV 2023년 5월 25일
You may omit nans. Read the documentation.
@KSSV, yes it ran properly. Can you please give me an idea on how can I bootstrap every pixel's mean and use the same technique?
KSSV
KSSV 2023년 5월 26일
What do you mean by bootstrap?
Bootstrap mean of every pixel's mean.
KSSV
KSSV 2023년 5월 26일
You already have it in mu right?
Yes. But that is a general mean of 764 data points. Not the bootstrap one.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

질문:

2023년 5월 25일

댓글:

2023년 5월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by