Is there a way to get the result object of a call to histogram() without the histogram plot? I want to use the results in a script without figures being generated.
Thanks.
On octave you can use
values = hist(...);
without generating a plot. hist
will also return the bin centers if you provide a second output argument. Note that Mathworks recommends using histogram
and histcounts
(see below) instead. You may also be interested in histc
which takes the position of the bin edges as an input.
On current Matlab versions you can also use histcounts
to get the bin counts and edges.
Please see also the documentation of hist and histcounts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With