MS-SBVAR: support non 4 digit years (fix thanks to Margarita Zabelina)

time-shift
Houtan Bastani 2012-02-01 18:04:24 +01:00
parent 837451c724
commit dd1a48c7c7
2 changed files with 2 additions and 4 deletions

View File

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

View File

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