Commit 43e8ace7 authored by Andrew Senior's avatar Andrew Senior

Extend Octave landscape printing bug workaround to cover Octave versions

3.8.x and 4.0.x.
parent 956020ac
......@@ -38,11 +38,17 @@ pwr_tot=1e3*sum(txg.pwr);
psize=[11.69 8.27]; % A4, in inches (Octave 3.2.4 doesn't like cm)
ppos=[0 0 psize];
if strcmp(v.Version,'3.8.1')
[vnums,vc,vemsg]=sscanf(v.Version, '%d.%d');
if vc ~= 2
error('Unable to parse Octave version number');
if all(vnums==[3; 8]) || all(vnums==[4; 0])
warning('Doing workaround for landscape printing bug')
ppos([3 4])=ppos([4 3]);
set(fh,'paperunits','inches','papersize',psize, ...
Markdown is supported
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