Borrar filtros
Borrar filtros

i want to determine lower and upper points in histigram

2 visualizaciones (últimos 30 días)
elham kreem
elham kreem el 28 de Feb. de 2018
Comentada: Steven Lord el 1 de Mzo. de 2018
i have a column and i plot its values as a normal histogram but i can't determine this histogram between two points .
such as
histfit(y,10,'normal') , i want that the histogram appears between (-1 , 1)

Respuesta aceptada

SvB
SvB el 28 de Feb. de 2018
If you only want to shift the view of the histogram, simply use
xlim([-1 1])
%and/or
ylim([-1 1])
so show only that part of the histogram that appears between (-1,1). (I'm not sure what axis you meant, so try both :) ).
If you instead meant that you want the data to appear between (-1, 1), you'd actually have to adjust y itself to ensure no values are smaller than -1 or larger than 1, but I doubt that's what you're after.
  1 comentario
Steven Lord
Steven Lord el 1 de Mzo. de 2018
Or if you want to bin only the data between -1 and 1, specify 'BinLimits' when you call the histogram function. See the documentation for that Name-Value Pair Argument on the histogram documentation page for more information on this argument.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by