Borrar filtros
Borrar filtros

plotting standard deviation using normfit

5 visualizaciones (últimos 30 días)
Mayank Lakhani
Mayank Lakhani el 2 de Ag. de 2015
Comentada: Star Strider el 2 de Ag. de 2015
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.

Respuesta aceptada

Star Strider
Star Strider el 2 de Ag. de 2015
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 comentarios
Mayank Lakhani
Mayank Lakhani el 2 de Ag. de 2015
Thanks Star Strider. This is what i am looking for :D
Star Strider
Star Strider el 2 de Ag. de 2015
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre View and Analyze Simulation Results en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by