interpolation with non-zero data only when using griddata

8 visualizaciones (últimos 30 días)
roudan el 6 de En. de 2020
Comentada: roudan el 6 de En. de 2020
Happy New Year!
Could anyone here help me with below issue?
I am trying to show the contour of Well Injection Pressure on well trajectory. So I have well trajectory defined by coordinates of x and y using WellCoordinate(:,1),WellCoordinate(:,2), respectively. And I have also well injection pressure along well trajectory using WellInjPres. Now I am using griddata to plot contour of well injection pressure in xg,yg grid.
Now the result is: it also interpolates outside the well trajectory, please see picture. My question is how to remove the interpolation outside the well trajectory?
I like the interpolation is done only within well trajectory.
or could I just project data into the grid without interpolation?
Thank you so much for your help. I appreciate it.

Respuesta aceptada

KSSV el 6 de En. de 2020
  1. Get the boundary of your required region
  2. use inpolygon to get the points lying inside and outside the boundary
  3. Make the data for the points lying outside NaN.
  1 comentario
roudan el 6 de En. de 2020
Awesome KSSV, that is Perfect! It works!
Here are the codes it worked!
% find the boundary of well trajectories
k = boundary(WellCoordinate(:,1),WellCoordinate(:,2));
% check if point inside the grids of xg,yg inside the above well trajectory
% boundary lines
inside_welltrajectory = inpolygon(xg,yg,WellCoordinate(k,1),WellCoordinate(k,2));
I appreciate it, KSSV.

Iniciar sesión para comentar.

Más respuestas (0)




Community Treasure Hunt

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

Start Hunting!

Translated by