필터 지우기
필터 지우기

Finding Statistics of a Matrix Help!!!

조회 수: 5 (최근 30일)
RB
RB 2018년 2월 27일
댓글: Star Strider 2018년 2월 27일
Hello, currently I have a 1024x1024 array in matlab that I have loaded in from a .txt file:
a = load('File.txt');
I want to find the mean, standard deviation, and the quartile ranges for this array. So far, I have only come across commands that return the average of each column or row, however I want to get basic statistical information when considering every element in the array. Is there a simple command or function that will just spit all this information out for me in a table? Any help is greatly appreciated.

채택된 답변

Star Strider
Star Strider 2018년 2월 27일
Force the array into a vector, then use mean, std, the appropriate version of iqr, and the rest.
Example
a_mean = mean(a(:));
and so for the other functions.
  댓글 수: 2
RB
RB 2018년 2월 27일
Yes thank you! Do you know how I would be able to find the ranges for the different quartiles? I am now specifically loooking for the first and fourth quartile range (rather than the Interquartile range). Thank you for your help!
Star Strider
Star Strider 2018년 2월 27일
As always, my pleasure!
I addressed that in my Answer to your follow-up Question.

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

추가 답변 (1개)

David Fletcher
David Fletcher 2018년 2월 27일
You could reshape the matrix into a vector, then apply the functions to the vector

카테고리

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