numerical gradient with extra-large data size
이전 댓글 표시
Hi:
I have a 3D coordinate with significantly large size: 1e9*3.
and I have value of parameter at each of these points such as T: 1e9*1.
now I need the gradient of T at each direction, such as dT/dx, dT/dy, dT/dz.
is there anyway to do this?
Thanks!
Li
답변 (1개)
Walter Roberson
2018년 1월 16일
0 개 추천
You might be able to take advantage of "tall arrays" https://www.mathworks.com/help/matlab/tall-arrays.html
댓글 수: 9
Yu Li
2018년 1월 16일
Walter Roberson
2018년 1월 16일
If you have enough memory for the temporary arrays, then you can just calculate the same way as you would if the data were smaller, by calling gradient() with three outputs. https://www.mathworks.com/help/matlab/ref/gradient.html
Yu Li
2018년 1월 16일
편집: Walter Roberson
2018년 1월 17일
Image Analyst
2018년 1월 16일
If you turn the array into a 3-D image you could use convn().
Yu Li
2018년 1월 16일
편집: Walter Roberson
2018년 1월 17일
Walter Roberson
2018년 1월 17일
Is it correct that you have a set of scattered points that are not at regular intervals in the coordinates, and you want to calculate the gradient? If so then do you want to calculate the gradient over a grid or only at the existing points?
With scattered points it will be necessary to use an interpolation method. Is (bi-)linear interpolation acceptable or do you need something like spline ?
Yu Li
2018년 1월 17일
편집: Walter Roberson
2018년 1월 17일
Walter Roberson
2018년 1월 17일
See https://projecteuclid.org/download/pdf_1/euclid.rmjm/1250127676 for a discussion of algorithms, and http://www.tandfonline.com/doi/pdf/10.1080/02626667409493918 for more information on the one they recommend.
But I wonder what you are headed for?
http://journals.ametsoc.org/doi/abs/10.1175/1520-0493%281994%29122%3C1611%3AUOMIFM%3E2.0.CO%3B2 "Use of Multiquadric Interpolation for Meteorological Objective Analysis "
http://www.worldscientific.com/worldscibooks/10.1142/6437 "Meshfree Approximations in MATLAB"
Yu Li
2018년 1월 17일
편집: Walter Roberson
2018년 1월 17일
카테고리
도움말 센터 및 File Exchange에서 Computational Fluid Dynamics (CFD)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!