Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

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)
title('Disney Histogram')

Related Examples

See Also

| |

Introduced before R2006a

Was this topic helpful?