Commit dc8bc3ef authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Use filesep instead of '/'

parent 4b4e7ad6
......@@ -181,6 +181,6 @@ if pltinfo
ylabel('f(\omega)')
box on
axis tight
dyn_saveas(hh,[M_.fname '/graphs/SpectralDensity_' deblank(M_.endo_names(ivar(i),:))],options_)
dyn_saveas(hh,[M_.fname ,filesep,'graphs', filesep, 'SpectralDensity_' deblank(M_.endo_names(ivar(i),:))],options_)
end
end
......@@ -74,11 +74,11 @@ end
for j=1:length(a),
if strmatch([fname_,tmp],a(j).name),
disp(a(j).name)
delete([OutDir,'/',a(j).name])
delete([OutDir,filesep,a(j).name])
end,
if strmatch([fname_,tmp1],a(j).name),
disp(a(j).name)
delete([OutDir,'/',a(j).name])
delete([OutDir,filesep,a(j).name])
end,
end
disp('done !')
......@@ -126,14 +126,14 @@ if ~loadSA,
obs = dat_fil_(options_.datafile);
%stock_gend=data_info.gend;
%stock_data = data_info.data;
load([DirectoryName '/' M_.fname '_data.mat']);
load([DirectoryName filesep M_.fname '_data.mat']);
filfilt = dir([DirectoryName filesep M_.fname '_filter_step_ahead*.mat']);
filparam = dir([DirectoryName filesep M_.fname '_param*.mat']);
x=[];
logpo2=[];
sto_ys=[];
for j=1:length(filparam),
%load([DirectoryName '/' M_.fname '_param',int2str(j),'.mat']);
%load([DirectoryName filesep M_.fname '_param',int2str(j),'.mat']);
if isempty(strmatch([M_.fname '_param_irf'],filparam(j).name))
load([DirectoryName filesep filparam(j).name]);
x=[x; stock];
......@@ -311,12 +311,12 @@ else
title(vvarvecm(i,:),'interpreter','none')
if mod(i,9)==0 || i==size(vvarvecm,1)
if options_.opt_gsa.ppost
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_post_lnprior',int2str(ifig)],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_post_lnprior',int2str(ifig)],options_);
else
if options_.opt_gsa.pprior
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_prior_lnprior',int2str(ifig) ],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_lnprior',int2str(ifig) ],options_);
else
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_mc_lnprior',int2str(ifig) ],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_lnprior',int2str(ifig) ],options_);
end
end
end
......@@ -348,12 +348,12 @@ else
end
if mod(i,9)==0 || i==size(vvarvecm,1)
if options_.opt_gsa.ppost
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_post_lnlik',int2str(ifig) ],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_post_lnlik',int2str(ifig) ],options_);
else
if options_.opt_gsa.pprior
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_prior_lnlik',int2str(ifig)],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_lnlik',int2str(ifig)],options_);
else
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_mc_lnlik',int2str(ifig) ],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_lnlik',int2str(ifig) ],options_);
end
end
end
......@@ -385,12 +385,12 @@ else
end
if mod(i,9)==0 || i==size(vvarvecm,1)
if options_.opt_gsa.ppost
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_post_lnpost',int2str(ifig) ],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_post_lnpost',int2str(ifig) ],options_);
else
if options_.opt_gsa.pprior
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_prior_lnpost',int2str(ifig)],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_lnpost',int2str(ifig)],options_);
else
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_mc_lnpost',int2str(ifig)],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_lnpost',int2str(ifig)],options_);
end
end
end
......@@ -542,12 +542,12 @@ else
%h0=legend({'base',vnam{np}}',0);
%set(findobj(get(h0,'children'),'type','text'),'interpreter','none')
if options_.opt_gsa.ppost
dyn_saveas(hh,[ OutDir '/' fname_ '_rmse_post_' int2str(ix)],options_);
dyn_saveas(hh,[ OutDir filesep fname_ '_rmse_post_' int2str(ix)],options_);
else
if options_.opt_gsa.pprior
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_prior_' int2str(ix) ],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_' int2str(ix) ],options_);
else
dyn_saveas(hh,[OutDir '/' fname_ '_rmse_mc_' int2str(ix)],options_);
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_' int2str(ix)],options_);
end
end
end
......
......@@ -60,18 +60,18 @@ if nargin==0,
end
if pprior
load([dirname,'/',M_.fname,'_prior'],'lpmat', 'lpmat0', 'istable','T');
adir=[dirname '/redform_stab'];
load([dirname,filesep,M_.fname,'_prior'],'lpmat', 'lpmat0', 'istable','T');
adir=[dirname filesep 'redform_stab'];
else
load([dirname,'/',M_.fname,'_mc'],'lpmat', 'lpmat0', 'istable','T');
adir=[dirname '/redform_mc'];
load([dirname,filesep,M_.fname,'_mc'],'lpmat', 'lpmat0', 'istable','T');
adir=[dirname filesep 'redform_mc'];
end
if ~exist('T')
stab_map_(dirname,options_gsa_);
if pprior
load([dirname,'/',M_.fname,'_prior'],'T');
load([dirname,filesep,M_.fname,'_prior'],'T');
else
load([dirname,'/',M_.fname,'_mc'],'T');
load([dirname,filesep,M_.fname,'_mc'],'T');
end
if ~exist('T'),
disp('The model is too large!')
......@@ -131,7 +131,7 @@ for j=1:size(anamendo,1)
end
iplo=iplo+1;
js=js+1;
xdir0 = [adir,'/',namendo,'_vs_', namexo];
xdir0 = [adir,filesep,namendo,'_vs_', namexo];
if ilog==0,
if isempty(threshold)
if isempty(dir(xdir0))
......@@ -147,7 +147,7 @@ for j=1:size(anamendo,1)
end
if ~options_.nograph,
hf=dyn_figure(options_,'name',['Reduced Form Mapping: ',namendo,' vs. ', namexo]); hist(y0,30), title([namendo,' vs. ', namexo],'interpreter','none')
dyn_saveas(hf,[xdir,'/', namendo,'_vs_', namexo],options_);
dyn_saveas(hf,[xdir,filesep, namendo,'_vs_', namexo],options_);
end
% if ~isempty(iy),
% si(:,js) = redform_private(x0(iy,:), y0(iy), pshape, pd, iload, pnames, namendo, namexo, xdir, options_gsa_);
......@@ -203,7 +203,7 @@ for j=1:size(anamendo,1)
end
title([logflag,' ',namendo,' vs. ',namexo],'interpreter','none')
if iplo==9,
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_', namendo,'_vs_shocks_',logflag,num2str(ifig)],options_);
dyn_saveas(hfig,[dirname,filesep,M_.fname,'_redform_', namendo,'_vs_shocks_',logflag,num2str(ifig)],options_);
end
end
......@@ -211,7 +211,7 @@ for j=1:size(anamendo,1)
end
end
if iplo<9 && iplo>0 && ifig && ~options_.nograph,
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_', namendo,'_vs_shocks_',logflag,num2str(ifig)],options_);
dyn_saveas(hfig,[dirname,filesep,M_.fname,'_redform_', namendo,'_vs_shocks_',logflag,num2str(ifig)],options_);
end
ifig=0;
iplo=0;
......@@ -232,7 +232,7 @@ for j=1:size(anamendo,1)
end
iplo=iplo+1;
js=js+1;
xdir0 = [adir,'/',namendo,'_vs_', namlagendo];
xdir0 = [adir,filesep,namendo,'_vs_', namlagendo];
if ilog==0,
if isempty(threshold)
if isempty(dir(xdir0))
......@@ -251,7 +251,7 @@ for j=1:size(anamendo,1)
% end
if ~options_.nograph,
hf=dyn_figure(options_,'name',['Reduced Form Mapping: ',namendo,' vs. lagged ', namlagendo]); hist(y0,30), title([namendo,' vs. lagged ', namlagendo],'interpreter','none')
dyn_saveas(hf,[xdir,'/', namendo,'_vs_', namlagendo],options_);
dyn_saveas(hf,[xdir,filesep, namendo,'_vs_', namlagendo],options_);
end
if length(iy)>size(x0,2) && length(iyc)>size(x0,2),
delete([xdir, '/*threshold*.*'])
......@@ -303,7 +303,7 @@ for j=1:size(anamendo,1)
end
title([logflag,' ',namendo,' vs. ',namlagendo,'(-1)'],'interpreter','none')
if iplo==9,
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_', namendo,'_vs_lags_',logflag,num2str(ifig)],options_);
dyn_saveas(hfig,[dirname,filesep,M_.fname,'_redform_', namendo,'_vs_lags_',logflag,num2str(ifig)],options_);
end
end
......@@ -311,7 +311,7 @@ for j=1:size(anamendo,1)
end
end
if iplo<9 && iplo>0 && ifig && ~options_.nograph,
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_', namendo,'_vs_lags_',logflag,num2str(ifig)],options_);
dyn_saveas(hfig,[dirname,filesep,M_.fname,'_redform_', namendo,'_vs_lags_',logflag,num2str(ifig)],options_);
end
end
......@@ -329,7 +329,7 @@ if isempty(threshold) && ~options_.nograph,
text(ip,-0.02,deblank(pnames(ip,:)),'rotation',90,'HorizontalAlignment','right','interpreter','none')
end
title('Reduced form GSA')
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_gsa'],options_);
dyn_saveas(hfig,[dirname,filesep,M_.fname,'_redform_gsa'],options_);
else
hfig=dyn_figure(options_,'name','Reduced Form GSA'); %bar(silog)
......@@ -344,7 +344,7 @@ if isempty(threshold) && ~options_.nograph,
text(ip,-0.02,deblank(pnames(ip,:)),'rotation',90,'HorizontalAlignment','right','interpreter','none')
end
title('Reduced form GSA - Log-transformed elements')
dyn_saveas(hfig,[dirname,'/',M_.fname,'_redform_gsa_log'],options_);
dyn_saveas(hfig,[dirname,filesep,M_.fname,'_redform_gsa_log'],options_);
end
end
......@@ -370,7 +370,7 @@ if iload==0,
end
if ~options_.nograph,
hfig=dyn_figure(options_,'name',['Reduced Form Mapping: ', namy,' vs. ', namx]); hist(y0,30), title([namy,' vs. ', namx],'interpreter','none')
dyn_saveas(hfig,[xdir,'/', namy,'_vs_', namx],options_);
dyn_saveas(hfig,[xdir,filesep, namy,'_vs_', namx],options_);
end
% gsa_ = gsa_sdp_dyn(y0, x0, -2, [],[],[],1,fname, pnames);
nrun=length(y0);
......@@ -396,14 +396,14 @@ if iload==0,
hfig=dyn_figure(options_,'name',['Reduced Form Mapping: ' namy,'_vs_', namx,'_fit']);
plot(y0(1:nfit),[gsa_.fit y0(1:nfit)],'.'),
title([namy,' vs. ', namx,' fit'],'interpreter','none')
dyn_saveas(hfig,[xdir,'/', namy,'_vs_', namx,'_fit'],options_);
dyn_saveas(hfig,[xdir,filesep, namy,'_vs_', namx,'_fit'],options_);
if nfit<nrun,
npred=[nfit+1:nrun];
yf = ss_anova_fcast(x0(npred,:), gsa_);
hfig=dyn_figure(options_,'name',['Reduced Form Mapping: ' namy,'_vs_', namx,'_pred']);
plot(y0(npred),[yf y0(npred)],'.'),
title([namy,' vs. ', namx,' pred'],'interpreter','none')
dyn_saveas(hfig,[xdir,'/', namy,'_vs_', namx,'_pred'],options_);
dyn_saveas(hfig,[xdir,filesep, namy,'_vs_', namx,'_pred'],options_);
end
end
......@@ -415,7 +415,7 @@ else
hfig=dyn_figure(options_,['Reduced Form Mapping: ' namy,'_vs_', namx,'_pred']);
plot(y0,[yf y0],'.'),
title([namy,' vs. ', namx,' pred'],'interpreter','none')
dyn_saveas(hfig,[xdir,'/', namy,'_vs_', namx,'_pred'],options_);
dyn_saveas(hfig,[xdir,filesep, namy,'_vs_', namx,'_pred'],options_);
end
end
% si = gsa_.multivariate.si;
......
......@@ -334,7 +334,7 @@ if fload==0,
ys_=real(dr_.ys);
yys(:,j) = ys_;
ys_=yys(:,1);
dyn_waitbar(j/Nsam,h,['MC iteration ',int2str(j),'/',int2str(Nsam)])
dyn_waitbar(j/Nsam,h,['MC iteration ',int2str(j),filesep,int2str(Nsam)])
end
dyn_waitbar_close(h);
if prepSA && jstab,
......@@ -388,31 +388,31 @@ if fload==0,
bkpprior.p4=bayestopt_.p4;
if pprior,
if ~prepSA
save([OutputDirectoryName '/' fname_ '_prior.mat'], ...
save([OutputDirectoryName filesep fname_ '_prior.mat'], ...
'bkpprior','lpmat','lpmat0','iunstable','istable','iindeterm','iwrong', ...
'egg','yys','nspred','nboth','nfwrd','infox')
else
save([OutputDirectoryName '/' fname_ '_prior.mat'], ...
save([OutputDirectoryName filesep fname_ '_prior.mat'], ...
'bkpprior','lpmat','lpmat0','iunstable','istable','iindeterm','iwrong', ...
'egg','yys','T','nspred','nboth','nfwrd','infox')
end
else
if ~prepSA
save([OutputDirectoryName '/' fname_ '_mc.mat'], ...
save([OutputDirectoryName filesep fname_ '_mc.mat'], ...
'lpmat','lpmat0','iunstable','istable','iindeterm','iwrong', ...
'egg','yys','nspred','nboth','nfwrd','infox')
else
save([OutputDirectoryName '/' fname_ '_mc.mat'], ...
save([OutputDirectoryName filesep fname_ '_mc.mat'], ...
'lpmat','lpmat0','iunstable','istable','iindeterm','iwrong', ...
'egg','yys','T','nspred','nboth','nfwrd','infox')
end
end
else
if pprior,
filetoload=[OutputDirectoryName '/' fname_ '_prior.mat'];
filetoload=[OutputDirectoryName filesep fname_ '_prior.mat'];
else
filetoload=[OutputDirectoryName '/' fname_ '_mc.mat'];
filetoload=[OutputDirectoryName filesep fname_ '_mc.mat'];
end
load(filetoload,'lpmat','lpmat0','iunstable','istable','iindeterm','iwrong','egg','yys','nspred','nboth','nfwrd','infox')
Nsam = size(lpmat,1);
......@@ -451,7 +451,7 @@ else
ys_=real(dr_.ys);
yys(:,j) = ys_;
ys_=yys(:,1);
dyn_waitbar(j/ntrans,h,['MC iteration ',int2str(j),'/',int2str(ntrans)])
dyn_waitbar(j/ntrans,h,['MC iteration ',int2str(j),filesep,int2str(ntrans)])
end
dyn_waitbar_close(h);
save(filetoload,'T','-append')
......@@ -485,12 +485,12 @@ else
awrongname='mc_wrong'; awrongtitle='Posterior No Solution Found';
asname='mc_stable'; astitle='Posterior Stable';
end
delete([OutputDirectoryName,'/',fname_,'_',aname,'_*.*']);
%delete([OutputDirectoryName,'/',fname_,'_',aname,'_SA_*.*']);
delete([OutputDirectoryName,'/',fname_,'_',asname,'_corr_*.*']);
delete([OutputDirectoryName,'/',fname_,'_',auname,'_corr_*.*']);
delete([OutputDirectoryName,'/',fname_,'_',aunstname,'_corr_*.*']);
delete([OutputDirectoryName,'/',fname_,'_',aindname,'_corr_*.*']);
delete([OutputDirectoryName,filesep,fname_,'_',aname,'_*.*']);
%delete([OutputDirectoryName,filesep,fname_,'_',aname,'_SA_*.*']);
delete([OutputDirectoryName,filesep,fname_,'_',asname,'_corr_*.*']);
delete([OutputDirectoryName,filesep,fname_,'_',auname,'_corr_*.*']);
delete([OutputDirectoryName,filesep,fname_,'_',aunstname,'_corr_*.*']);
delete([OutputDirectoryName,filesep,fname_,'_',aindname,'_corr_*.*']);
if length(iunstable)>0 && length(iunstable)<Nsam,
fprintf(['%4.1f%% of the prior support gives unique saddle-path solution.\n'],length(istable)/Nsam*100)
......
......@@ -100,6 +100,6 @@ for i=1:ceil(nparplot/12),
% title([ftit{j},'. D-stat ', num2str(dproba(ipar(j)),2)],'interpreter','none')
title([ftit{j},'. p-value ', num2str(proba(ipar(j)),2)],'interpreter','none')
end
dyn_saveas(hh,[dirname,'/',fname_,'_',aname,'_SA_',int2str(i)],options_);
dyn_saveas(hh,[dirname,filesep,fname_,'_',aname,'_SA_',int2str(i)],options_);
end
end
......@@ -112,7 +112,7 @@ for j=1:npar,
end
title(['cc = ',num2str(c0(i2(jx),j))])
if (mod(j2,12)==0) && j2>0,
dyn_saveas(hh,[dirname,'/',fig_nam_,int2str(ifig)],options_);
dyn_saveas(hh,[dirname,filesep,fig_nam_,int2str(ifig)],options_);
end
end
end
......@@ -120,7 +120,7 @@ for j=1:npar,
end
end
if ~options_.nograph && (j==(npar)) && j2>0 && (mod(j2,12)~=0),
dyn_saveas(hh,[dirname,'/',fig_nam_,int2str(ifig)],options_);
dyn_saveas(hh,[dirname,filesep,fig_nam_,int2str(ifig)],options_);
end
end
......
......@@ -92,7 +92,7 @@ elseif rplottype == 2
axis tight;
end
end
dyn_saveas(hh,[M_.fname '/graphs/SimulatedTrajectory_' deblank(s1(1,:))],options_)
dyn_saveas(hh,[M_.fname, filesep, 'graphs', filesep, 'SimulatedTrajectory_' deblank(s1(1,:))],options_)
% 02/28/01 MJ replaced bseastr by MATLAB's strmatch
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment