필터 지우기
필터 지우기

how can i compute std 2d

조회 수: 6 (최근 30일)
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2022년 2월 25일
댓글: Walter Roberson 2022년 2월 25일
Hi
iwould like to ask how can i obtain std along all the rows and columns as culored image that explain the values of std
the matrix dimension is 51 71 any suggestion ?
thanks
  댓글 수: 2
Walter Roberson
Walter Roberson 2022년 2월 25일
Could you give an example of what you would like the output to look like?
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2022년 2월 25일
like this image that explain the std

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

답변 (1개)

Walter Roberson
Walter Roberson 2022년 2월 25일
편집: Walter Roberson 2022년 2월 25일
data = randn(51, 71).*rand(51,71); %just some data
std_along_columns = std(data, [], 1); %one result for each column
std_along_rows = std(data, [], 2); %one result for each row
std_overall = std(data(:)); %over entire array
whos
Name Size Bytes Class Attributes data 51x71 28968 double std_along_columns 1x71 568 double std_along_rows 51x1 408 double std_overall 1x1 8 double
  댓글 수: 2
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2022년 2월 25일
thank you but can i plot them in matrix that explain different colors of std
Walter Roberson
Walter Roberson 2022년 2월 25일
You cannot. std means standard deviation which is property of groups of data, not of individual points. For example you can take the standard deviation along the rows and do a line plot of that.
In order to have a 2 dimension array of standard deviation results, you would have need to have started with a 3D array. For example,
cmap = flipud(hot(64));
data = sort(randn(51, 71, 83) .* rand(51, 71, 83),1); %just some data
s = std(data, [], 3);
imagesc(s); colormap(cmap)
colorbar()

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by