<< a2q Time series car2freq >>

Grocer >> Time series > b2m

b2m

expand a original series into a monthly one

CALLING SEQUENCE

tsout=b2m(tsin)

PARAMETERS

Input

* tsin = a time series available every two months

* option = an integer, between -1 and 2:

   . -1 if each monthly value is equal to the original one (default if the argument is not given)

   . 0 if each monthly value is equal to the original one divided by 2

   . n if the value of the n-th month is equal to the original one and the others are set to %nan

Output

* tsout = the corresponding monthly time series

DESCRIPTION

Expands a series available every 2 months into a monthly one, with various options for the resulting monthly values.

EXAMPLE

x = reshape([1:35],'1978b1') // create a ts avalaible every two months 
y = b2m(x) 
// gives a monthly ts, from 1978m1 to 1983m10 with values 1 for the first 2 months of 1978, 
// 2 for the 2 following months of 1978...
y = b2m(x,2)
// gives a monthly ts, from 1978m1 to 1983m10 with values %nan,1,%nan,2,...

AUTHOR

Eric Dubois 2020

Report an issue
<< a2q Time series car2freq >>