diff --git a/matlab/estimation/GetAllPosteriorDraws.m b/matlab/estimation/GetAllPosteriorDraws.m
index 11c3e2599357beadef3606bd2dee3d77e04b4e4e..fdea14c93f56029116a2a2887379f0d34a63a3e2 100644
--- a/matlab/estimation/GetAllPosteriorDraws.m
+++ b/matlab/estimation/GetAllPosteriorDraws.m
@@ -61,7 +61,7 @@ if issmc(options_)
                 draws = transpose(posterior.param(column,:));
             end
         else
-            draws = NaN;
+            draws=NaN(size(posterior.param,2),1);
         end
     elseif isdime(options_)
         posterior = load(sprintf('%s%s%s%schains.mat', dname, filesep(), 'dime', filesep()));