Merge remote-tracking branch 'houtanb/master'

time-shift
Sébastien Villemot 2012-02-03 08:51:06 +01:00
commit b8e1ecbcec
8 changed files with 1407 additions and 1402 deletions

View File

@ -39,8 +39,7 @@ hornum = cell(length(vyrs),1); % horizontal year (number)
count=0;
for k=vyrs'
count=count+1;
jnk=num2str(k);
hornum{count}=jnk(3:4); % e.g., with '1990', we have '90'
hornum{count}=num2str(k);
end
count=0;

View File

@ -141,6 +141,8 @@ for i = 1:lags
sgpbid((i-1)*nvar+j) = lagdecay^2/sgsh(j); % ith equation
elseif (q_m==4)
sgpbid((i-1)*nvar+j) = (1/i^mu(4))^2/sgsh(j); % ith equation
elseif (q_m==1)
sgpbid((i-1)*nvar+j) = (1/(i*4)^mu(4))^2/sgsh(j); % ith equation
else
error('Incompatibility with lags, check the possible errors!!!')
%warning('Incompatibility with lags, check the possible errors!!!')

View File

@ -163,6 +163,8 @@ for i = 1:lags
sgpbid((i-1)*nvar+j) = lagdecay^2/sgsh(j); % ith equation
elseif (q_m==4)
sgpbid((i-1)*nvar+j) = (1/i^mu(4))^2/sgsh(j); % ith equation
elseif (q_m==1)
sgpbid((i-1)*nvar+j) = (1/(i*4)^mu(4))^2/sgsh(j); % ith equation
else
error('Incompatibility with lags, check the possible errors!!!')
%warning('Incompatibility with lags, check the possible errors!!!')

View File

@ -176,8 +176,11 @@ if (options_.ms.freq==12)
elseif (options_.ms.freq==4)
nStart=(yrStart-options_.ms.initial_year )*4+qmStart-options_.ms.initial_subperiod ; % positive number of months at the start
nEnd=(yrEnd-options_.ms.final_year )*4+qmEnd-options_.ms.final_subperiod ; % negative number of months towards end
elseif (options_.ms.freq==1)
nStart=(yrStart-options_.ms.initial_year )*1+qmStart-options_.ms.initial_subperiod ; % positive number of months at the start
nEnd=(yrEnd-options_.ms.final_year )*1+qmEnd-options_.ms.final_subperiod ; % negative number of months towards end
else
error('Error: this code is only good for monthly/quarterly data!!!')
error('Error: this code is only good for monthly/quarterly/yearly data!!!')
return
end
%

View File

@ -90,8 +90,7 @@ qmEnd=options_.ms.final_subperiod;
if options_.forecast<1
error('To be safe, the number of forecast years should be at least 1')
end
ystr=num2str(yrEnd);
forelabel = [ ystr(3:4) ':' num2str(qmEnd) ' Forecast'];
forelabel = [num2str(yrEnd) ':' num2str(qmEnd) ' Forecast'];
nSample=(yrEnd-yrStart)*options_.ms.freq + (qmEnd-qmStart+1);
if qmEnd==options_.ms.freq