Contents
init;
seti.incNb = 1;
seti.measNb = 2;
seti = setData(seti);
q = seti.qROIexact;
h = 0.1.*(rand(size(q)) + 1i*rand(size(q)));
Test for sufficent changes to deal with a nother wave number
if 0
seti.k = 50;
seti = setKernel(seti);
seti = setIncField(seti);
seti = setMeasKer(seti);
[FFqMeas,~,~] = forward(seti,q);
seti = setData(seti);
[FFqMeasComp,~,~] = forward(seti,q);
norm(FFqMeasComp-FFqMeas)/norm(FFqMeas)
end
Compute F(q+h) and the linear approximation F'(q)[h]+F(q):
kVec = 0:1:150;
rel = zeros(size(kVec));
i = 0;
for k = kVec
i = i+1;
seti.k = k;
seti = setKernel(seti);
seti = setIncField(seti);
seti = setMeasKer(seti);
[FFqhMeas,~,~] = forward(seti,q+h);
[FFqMeas,~,~] = forward(seti,q);
[JA,JB] = derivative(seti,q);
FFqhMeasLin = JA*diag(h)*JB + FFqMeas;
rel(i) = norm(FFqhMeas-FFqhMeasLin)/norm(FFqhMeas);
end
Relative error in dependence of wave number k?
figure(1); h = plot(kVec,rel); axis square;
set(gca,'FontSize',20); axis square; set(h,'LineWidth',2); print(1,'-depsc','guideLin.eps');