How can I obtain 20 frames of noise?

조회 수: 1 (최근 30일)
Rahul Shah
Rahul Shah 2021년 9월 20일
편집: Rahul Shah 2021년 9월 21일
Each noise has a mean of 40 and standard deviation of 25. How can I show any one copy of the noise to enhance it for display purpose and the histogram distribution of that noise.

채택된 답변

William Rose
William Rose 2021년 9월 20일
@Rahul Shah, do your frames have one or two dimensions? I will assume you mean 2D frames. Let's assume each frame is 32x32. The mean and s.d. you have specified will cause some array values to be negative. If the values represent image intensities, then negative values are non-sensical, and you should adjust the mean and SD accordingly.
mn=40;
sd=25;
A=mn*ones(32,32,20)+sd*sqrt(12)*(rand(32,32,20)-0.5);
B=reshape(A,[32*32*20,1]);
fprintf('A: mean=%.3f, s.d.=%.3f, min=%.3f, max=%.3f\n',mean(B),std(B),min(B),max(B));
A: mean=39.958, s.d.=24.929, min=-3.300, max=83.301
A9=A(:,:,9); %frame 9
histogram(A9)
image(A9)
Try.
  댓글 수: 3
Rahul Shah
Rahul Shah 2021년 9월 20일
Thank you so much.
William Rose
William Rose 2021년 9월 20일
@Rahul Shah, you're welcome. Good luck!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by