Can anyone identify this finite difference approximation code?
11 views (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 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.
Answers (1)
See Also
Categories
Find more on Biomedical Imaging in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!