numerical gradient with extra-large data size
Afficher commentaires plus anciens
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
Réponses (1)
Walter Roberson
le 16 Jan 2018
0 votes
You might be able to take advantage of "tall arrays" https://www.mathworks.com/help/matlab/tall-arrays.html
9 commentaires
Yu Li
le 16 Jan 2018
Walter Roberson
le 16 Jan 2018
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
le 16 Jan 2018
Modifié(e) : Walter Roberson
le 17 Jan 2018
Image Analyst
le 16 Jan 2018
If you turn the array into a 3-D image you could use convn().
Yu Li
le 16 Jan 2018
Modifié(e) : Walter Roberson
le 17 Jan 2018
Walter Roberson
le 17 Jan 2018
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
le 17 Jan 2018
Modifié(e) : Walter Roberson
le 17 Jan 2018
Walter Roberson
le 17 Jan 2018
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
le 17 Jan 2018
Modifié(e) : Walter Roberson
le 17 Jan 2018
Catégories
En savoir plus sur Computational Fluid Dynamics (CFD) dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!