Azzera filtri
Azzera filtri

i want to determine lower and upper points in histigram

2 visualizzazioni (ultimi 30 giorni)
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)

Risposta accettata

SvB
SvB il 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 Commento
Steven Lord
Steven Lord il 1 Mar 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.

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by