i want to determine lower and upper points in histigram

1 Ansicht (letzte 30 Tage)
elham kreem
elham kreem am 28 Feb. 2018
Kommentiert: Steven Lord am 1 Mär. 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)

Akzeptierte Antwort

SvB
SvB am 28 Feb. 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 Kommentar
Steven Lord
Steven Lord am 1 Mär. 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by