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.

volarea

Price and volume chart

Syntax

volarea(X)

Arguments

X

X can be a table or a M-by-3 matrix. If X is a table, the first column of dates can be serial date numbers, date character vectors, or datetime arrays. If X is a M-by-3 matrix, the first column contains date numbers, the second column is the asset price, and the third column is the volume.

Description

volarea(X) plots asset date, price, and volume on a single axis.

Examples

collapse all

This example shows how to plot asset date, price, and volume on a single axis, given asset X as an M-by-3 matrix of date numbers, asset price, and volume.

X = [...

733299.00         41.99   15045445.00;...
733300.00         42.14   15346658.00;...
733303.00         41.93    9034397.00;...
733304.00         41.98   14486275.00;...
733305.00         41.75   16389872.00;...
733306.00         41.61   20475208.00;...
733307.00         42.29   14833200.00;...
733310.00         42.19   18945176.00;...
733311.00         41.82   25188101.00;...
733312.00         41.93   22689878.00;...
733313.00         41.81   21084723.00;...
733314.00         41.37   27963619.00;...
733317.00         41.17   20385033.00;...
733318.00         42.02   27783775.00];

volarea(X)

This example shows how to use datetime input to plot asset date, price, and volume on a single axis, given asset X as an M-by-3 matrix of date numbers, asset price, and volume.

X = [...

733299.00         41.99   15045445.00;...
733300.00         42.14   15346658.00;...
733303.00         41.93    9034397.00;...
733304.00         41.98   14486275.00;...
733305.00         41.75   16389872.00;...
733306.00         41.61   20475208.00;...
733307.00         42.29   14833200.00;...
733310.00         42.19   18945176.00;...
733311.00         41.82   25188101.00;...
733312.00         41.93   22689878.00;...
733313.00         41.81   21084723.00;...
733314.00         41.37   27963619.00;...
733317.00         41.17   20385033.00;...
733318.00         42.02   27783775.00];

t=array2table(X);
t.X1 = datetime(t.X1,'ConvertFrom','datenum','Locale','en_US');
volarea(t);

Related Examples

Introduced in R2008a

Was this topic helpful?