[X,Jordan,Q,Z,S,T,history] = ...
jdqz('Afun','Bfun',k,Sigma,Options,Par(1),Par(2),...),
The additional input arguments Par(1), Par(2),... are passed to 'Afun' and to 'Bfun' as input arguments: for instance, Av = Afun(v,'',Par(1),Par(2),...).
With flag = 'dimension', the statement Afun(v,flag,...)
should return the dimension n of the problem. With flag ='',
flag = 'A', or flag = 'B', it should return an n-vector Av; with flag ='', it also may return two n-vectors: [Av,Bv].
Other choices for flag are also allowed (for instance, flag = 'preconditioner', flag = 'L', flag = 'U'). However, an error should result for unknown (or unused) selections.
Example.
function [Av,Bv] = Afun(v,flag,gamma) switch flag case 'dimension' Av = 10000; Bv = []; return case '' otherwise %%% error message should be included! error(sprintf('''%s'' unknown flag',flag)) end [Av,Bv] = ABfun(v,gamma); return