Pre-computed triangulation for scatteredInterpolant

  • I have a data file that contains >400 time steps of velocity data at spatial locations scattered in 3D space. I use the data in this file in a lot of MATLAB scripts. Using the scatteredInterpolant class I was able to get velocity at any location I want.
  • However, it is rather time consuming to perform the triangulation every time I use the file.
  • I tried to store the computed scatteredInterpolant objects for each time step in a cell array,. and save to a mat file on disk. The intention was to load up this new mat-file instead if I want to access the data.
  • But it takes ages to load - as if MATLAB recomputes the functions every time the file loads.
Any solution to this? i.e. Is there a way to use scatteredInterpolant with pre-computed triangulation that I can just load up from a file?

5 comentarios

Matt J
Matt J el 20 de Mayo de 2016
I tried to store the computed scatteredInterpolant function handles for each time step in a cell array,. and save to a mat file on disk.
What exactly do you mean by a "scatteredInterpolant function handle"? scatteredInterpolant() is a class constructor. It generates objects of its own class, not ones of type function_handle.
Also, how big are the .mat files that this process generates? Maybe it takes ages to load because you just have a lot of data.
lm808
lm808 el 21 de Mayo de 2016
Editada: lm808 el 21 de Mayo de 2016
Hi Mat,
Thank you. What I meant was saving the constructed scatteredInterpolant objects in a MAT file. Each object has associated triangulation, coordinates and values stored within its properties. Basically the result (F) of the code "F = scatteredInterpolant(x,y,z,v)".
The .mat file is of similar size to the original data file.
KSSV
KSSV el 23 de Mayo de 2016
Editada: KSSV el 23 de Mayo de 2016
How big is your scattered data? Hope you are not doing triangulation for every time step. I have accessed a scattered data of size greater then 472193 with ease saving into a mat file. Interpolation was also quite fast enough.
lm808
lm808 el 25 de Mayo de 2016
I am doing triangulation for every time step - I have to because the spatial coordinates x,y,z changes at every time step.
About 2000 data points per time step, 500 time steps or so.
KSSV
KSSV el 26 de Mayo de 2016
2000 data points code should be fast enough. How much time it takes for one step calculation? Attach one step data here. Let me a give a try.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Delaunay Triangulation en Centro de ayuda y File Exchange.

Preguntada:

el 20 de Mayo de 2016

Comentada:

el 26 de Mayo de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by