hist

hist will be removed in a future release. Use timetable instead. For more information, see Convert Financial Time Series Objects fints to Timetables.

Syntax

hist(tsobj, numbins)
ftshist = hist(tsobj,numbins)
[ftshist,binpos] = hist(tsobj,numbins)

Arguments

tsobj

Financial time series object.

numbins

(Optional) Number of histogram bins. Default = 10.

Description

hist(tsobj,numbins) calculates and displays the histogram of the data series contained in the financial time series object tsobj.

ftshist = hist(tsobj,numbins) calculates, but does not display, the histogram of the data series contained in the financial time series object tsobj. The output ftshist is a structure with field names similar to the data series names of tsobj.

[ftshist,binpos] = hist(tsobj,numbins) additionally returns the bin positions binpos. The positions are the centers of each bin. binpos is a column vector.

Examples

collapse all

This example shows how to generate a histogram of Disney open, high, low, and close prices.

load disney.mat
dis = rmfield(dis,'VOLUME'); % Remove VOLUME field
hist(dis)
Warning: FINTS will be removed in a future release. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
title('Disney Histogram')

Introduced before R2006a