diff --git a/matlab/PosteriorIRF.m b/matlab/PosteriorIRF.m
index 9a89b4c0c244034e904b61313794a6c4af49b8a2..8b086c5b96daf8269893c53628351b6114aa4211 100644
--- a/matlab/PosteriorIRF.m
+++ b/matlab/PosteriorIRF.m
@@ -362,7 +362,7 @@ end
 % .tex generation always run in sequentially. This portion of code is execute in parallel by
 % PosteriorIRF_core2.m function.
 
-
+if ~options_.nograph && ~options_.no_graph.posterior
 % Save the local variables.
 localVars=[];
 
@@ -459,5 +459,6 @@ else
 end
 % END parallel code!
 
+end
 
 fprintf('Estimation::mcmc: Posterior IRFs, done!\n');
diff --git a/matlab/pm3.m b/matlab/pm3.m
index 21a486162cd1431d9ab27314aa8a296b7a125132..ae0f474d16b03363ce7ca1fd9a09168c2b6caf7c 100644
--- a/matlab/pm3.m
+++ b/matlab/pm3.m
@@ -292,6 +292,7 @@ end
 %% 	Finally I build the plots.
 %%
 
+if ~options_.nograph && ~options_.no_graph.posterior
 % Block of code executed in parallel, with the exception of file
 % .tex generation always run sequentially. This portion of code is execute in parallel by
 % pm3_core1.m function.
@@ -394,5 +395,6 @@ if options_.TeX && any(strcmp('eps',cellstr(options_.graph_format)))
     fprintf(fidTeX,'%% End of TeX file.\n');
     fclose(fidTeX);
 end
+end
 
-fprintf(['Estimation::mcmc: ' tit1 ', done!\n']);
\ No newline at end of file
+fprintf(['Estimation::mcmc: ' tit1 ', done!\n']);