diff --git a/matlab/gsa/log_trans_.m b/matlab/gsa/log_trans_.m index 39b44ab2504c7f782703b0c5ac709aac27364728..05c854095543fa0a0cc9d01ac7b1b01cd338e01b 100644 --- a/matlab/gsa/log_trans_.m +++ b/matlab/gsa/log_trans_.m @@ -38,7 +38,11 @@ if ~(max(y0)<0 | min(y0)>0) isig=-1; y0=-y0; end - n=hist(y0,10); + if isoctave + n=hist(y0,10); + else + n=histcounts(y0,10); + end if n(1)>20*n(end) try lam=fzero(f,[-min(y0)+10*eps -min(y0)+abs(median(y0))],[],y0); diff --git a/matlab/gsa/redform_map.m b/matlab/gsa/redform_map.m index d8681ce2da2cf9c5caa7ec70d0e6eda6cff4e96c..5bd3c3667f3c02cbbdc7ff65a558b3a29d3ccdb2 100644 --- a/matlab/gsa/redform_map.m +++ b/matlab/gsa/redform_map.m @@ -521,9 +521,17 @@ if iload==0 hh_fig=dyn_figure(options_.nodisplay,'name',options_map.figtitle); subplot(221) if ilog - hist(y1,30) + if isoctave + hist(y1,30) + else + histogram(y1,30) + end else - hist(y0,30) + if isoctave + hist(y0,30) + else + histogram(y0,30) + end end title(options_map.title,'interpreter','none') subplot(222) diff --git a/matlab/plot_identification.m b/matlab/plot_identification.m index 19b7836ae9480d095bc41e08e4d76a9bbd05addc..4afbf7ff2ef1292d890a3b86c471b8ead0f68830 100644 --- a/matlab/plot_identification.m +++ b/matlab/plot_identification.m @@ -411,13 +411,25 @@ else end hh_fig = dyn_figure(options_.nodisplay,'Name','MC Condition Number'); subplot(221) - hist(log10(idemodel.cond)) + if isoctave + hist(log10(idemodel.cond)) + else + histogram(log10(idemodel.cond)) + end title('log10 of Condition number in the model') subplot(222) - hist(log10(idemoments.cond)) + if isoctave + hist(log10(idemoments.cond)) + else + histogram(log10(idemoments.cond)) + end title('log10 of Condition number in the moments') subplot(223) - hist(log10(idelre.cond)) + if isoctave + hist(log10(idelre.cond)) + else + histogram(log10(idelre.cond)) + end title('log10 of Condition number in the LRE model') dyn_saveas(hh_fig,[IdentifDirectoryName '/' fname '_ident_COND' ],options_.nodisplay,options_.graph_format); options_mcf.pvalue_ks = 0.1;