How to add date column with the corresponding variables in rolling window

1 vue (au cours des 30 derniers jours)
RP
RP le 6 Nov 2019
Dear Matlab-users,
My excel file consists of 4 columns of daily data. First column represent the date column which is same for all the 3 rest variable columns. I calculating the genhurst function for my 3 series in a rolling window framework with the following code.
[numeric,textdata,rawdata]=xlsread('JK1.xlsx');
num1=numeric(:,isfinite(numeric(1, :)));
indexdata = rawdata(:,1:4);
%%My rolling
windowsize = 100;
startrows = 1:size(num1, 1)-windowsize+1;
HH = cell(numel(startrows), size(num1, 2));
for col = 1:size(num1, 2)
for row = 1:numel(startrows)
HH{row, col} = genhurst(num1(startrows(row):startrows(row)+windowsize-1, col));
end
end
Here, I want to add date column (available as the 1st column in the indexdata) in the rolling window framework so that can get the rolling estimated values correponding to the particular date.
For your convenience, I have attached my sample datafile.
Please help me.
Thank you.

Réponses (0)

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by