numerical gradient with extra-large data size
Mostra commenti meno recenti
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
Risposte (1)
Walter Roberson
il 16 Gen 2018
0 voti
You might be able to take advantage of "tall arrays" https://www.mathworks.com/help/matlab/tall-arrays.html
9 Commenti
Yu Li
il 16 Gen 2018
Walter Roberson
il 16 Gen 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
il 16 Gen 2018
Modificato: Walter Roberson
il 17 Gen 2018
Image Analyst
il 16 Gen 2018
If you turn the array into a 3-D image you could use convn().
Yu Li
il 16 Gen 2018
Modificato: Walter Roberson
il 17 Gen 2018
Walter Roberson
il 17 Gen 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
il 17 Gen 2018
Modificato: Walter Roberson
il 17 Gen 2018
Walter Roberson
il 17 Gen 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
il 17 Gen 2018
Modificato: Walter Roberson
il 17 Gen 2018
Categorie
Scopri di più su Computational Fluid Dynamics (CFD) in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!