Mar 16th, 2009
Blog categories:
Some days ago, I needed to write an m-file (Matlabâ„¢ Function File), which had to run under Octave as well. If you use full Octave compliant stuff, this works quite easily without modification of your code. But if you use e. g. subplot(…) with a range to make one plot broader or wider, Octave resigns. Therefore, I put in the following statement and wrote this blog message as a reminder :)
if exist('OCTAVE_VERSION')
figure
else
subplot( 4,1,[2:4] )
end
This runs under both, Matlabâ„¢ and Octave. Hope, this helped…
Cheers, iss
nesono