eate(<span class="string">'mt19937ar'</span>,<span class="string">'seed'</span>,seed);
I = randi(s,prod(nd),floor(p*prod(nd)),1);
D(I) = a*randn(s,size(I));

D = distributed(vec(D));

<span class="comment">% inversion</span>
params.misfit  = fh1;
params.src_est = fh2;

fh = @(x)JI_src(x,Q,D,[1:nd(2)],model,params);

options.itermax = maxiter;
options.fid     = fopen(<span class="string">'iter.log'</span>,<span class="string">'w'</span>);

mn = mylbfgs(fh,m0,options);

<span class="comment">% final evaluatio