plotting standard deviation using normfit

조회 수: 9 (최근 30일)
Mayank Lakhani
Mayank Lakhani 2015년 8월 2일
댓글: Star Strider 2015년 8월 2일
I have a matrix amp which is having dimension of [50000*100]. In which number of rows represents number of measurements. Using "normfit" fucntion i am getting standard deviation for different measurements like below.
[sigma, standard_deviation] = normfit(amp(1:10, 50));
[sigma, standard_deviation] = normfit(amp(1:100, 50));
[sigma, standard_deviation] = normfit(amp(1:1000, 50));
[sigma, standard_deviation] = normfit(amp(1:5000, 50));
[sigma, standard_deviation] = normfit(amp(1:10000, 50));
[sigma, standard_deviation] = normfit(amp(1:20000, 50));
how to catch, standard_deviation in a matrix and plot number of measurments vs standard deviation.

채택된 답변

Star Strider
Star Strider 2015년 8월 2일
Using normfit to calcualte the standard deviation is taking the long way round, since you’re not asking for the other outputs it can give you.
Use this instead:
len = [10, 100, 1000, 5000, 10000, 20000];
for k1 = 1:length(len)
standard_deviation(k1) = std(amp(1:len(k1), 50));
end
figure(1)
plot(len, standard_deviation)
grid
  댓글 수: 2
Mayank Lakhani
Mayank Lakhani 2015년 8월 2일
Thanks Star Strider. This is what i am looking for :D
Star Strider
Star Strider 2015년 8월 2일
As always, my pleasure!

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by