Can anyone identify this finite difference approximation code?
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
The code is as follows:
if bool == 1,
h = 2/n;
RT = ([RT(end,:); RT(1:end-1,:)] + [RT(2:end,:); RT(1,:)] - 2*RT)/h^2;
end
where RT is an image (a sinogram for back-projecting in this case) and n is the size of the image to be reconstructed. I need to able to identify which kind of finite difference it is and to what accuracy. I then need to produce code to do the same thing for the first derivative of the same accuracy. If anyone could identify this and perhaps help with the code too that would be great.
Thanks, Josh
2 Kommentare
Walter Roberson
am 5 Jul. 2017
That appears to be like f(x(n-1)) + f(x(n+1)) - 2 * f(x(n)) / delta^2, except with a circular wrap around. At the moment I do not catch why h is being squared.
My thought is that it looks to me to be more like a smoothing method than a finite difference approximation. However, I have little experience with finite difference approximation.
Antworten (1)
Siehe auch
Kategorien
Mehr zu Biomedical Imaging finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!