# HG changeset patch # User schloegl # Date 1430754909 0 # Node ID c84a3b399d19289cf18ccaf0e26ab6c3f46e5e34 # Parent 89788e3f77db065728921fb9fde22f7b1b93e6ec fix bug #44989 - Inappropriate check of Matlab version with Octave 4.0 diff -r 89788e3f77db -r c84a3b399d19 extra/tsa/inst/sinvest1.m --- a/extra/tsa/inst/sinvest1.m Mon Apr 27 09:17:42 2015 +0000 +++ b/extra/tsa/inst/sinvest1.m Mon May 04 15:55:09 2015 +0000 @@ -211,14 +211,14 @@ ylabel('imag(z)'); MATLAB_VERSION = version; - if MATLAB_VERSION(1)=='4' + if exist ("OCTAVE_VERSION", "builtin") || MATLAB_VERSION(1)=='5' + ax = gca; + tmp = get(ax,'DataAspectRatio'); + set(ax,'PlotBoxAspectRatio',tmp); + elseif MATLAB_VERSION(1)=='4' ax = gca; tmp = get(ax,'Aspect'); set(ax,'Aspect',[tmp(1),1]); - elseif MATLAB_VERSION(1)=='5' - ax = gca; - tmp = get(ax,'DataAspectRatio'); - set(ax,'PlotBoxAspectRatio',tmp); end; elseif K==11 plot([Y(:) filter([1 -ARPMX(:,oo/2*(oo-1)+(1:oo))],1,Y(:))-max(Y)+min(Y)]);