필터 지우기
필터 지우기

standard deviation of two elements of a 3d matrix

조회 수: 3 (최근 30일)
William
William 2013년 6월 28일
Greetings,
I have a 672 x 32 x 2800 matrix that I need to chop into a 672 x 2800 matrix but the rows need to be the standard deviation of the columns in the original 3d matrix. Here is what I am doing which is all wrong
new_col_data = zeros(672,2800);
new_col_data = [std(data, 0, 2),:]
I cannot figure this out. Can someone please tell me what is wrong?
Thank you

채택된 답변

Shashank Prasanna
Shashank Prasanna 2013년 6월 28일
편집: Shashank Prasanna 2013년 6월 28일
A = rand(672,32,2800); % Some random data:
B = std(A,[],2); % Compute the standard deviation
B = squeeze(B); % Squeeze it

추가 답변 (2개)

Sean de Wolski
Sean de Wolski 2013년 6월 28일
Sounds like you want to squeeze it!
squeeze(std(rand(60,30,45),0,2))

William
William 2013년 6월 28일
I tried this:
>> new_col_data = squeeze(std(data,0,2),:);
Error using var (line 59)
First argument must be single or double.
Error in std (line 32)
Something went wrong. I do not have a single dimension in this matrix
  댓글 수: 1
Sean de Wolski
Sean de Wolski 2013년 6월 28일
Mine doesn't have a squeeze(blah,:). It's supposed to jsut be squeeze(blah)

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by