78d04f1seqlab: write and view pulseq MRI sequences in the browserJeremy Magland 1classdef InputParserCompat < inputParser
2 % this is a customized parser class to replicate Matlab's undocumented
3 % behaviour on GNU Octave. In Matlab the optional positional arguments can
4 % also be called as param-value-pair with an arbitrary position
5 properties
6 needCopyOptional = mr.aux.isOctave();
7 end
9 methods
10 function parse (this, varargin)
11 if this.needCopyOptional && length(this.Optional)>0
12 for i=1:length(this.Optional)
13 this.Parameter(end+1)=this.Optional{i};
14 end
15 this.needCopyOptional = false;
16 end
17 parse@inputParser(this, varargin{:});
18 end
19 end
20end