- Get the boundary of your required region
- use inpolygon to get the points lying inside and outside the boundary
- Make the data for the points lying outside NaN.
interpolation with non-zero data only when using griddata
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi
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.
zg_wellinjpres=griddata(double(WellCoordinate(:,1)),double(WellCoordinate(:,2)),double(WellInjPres),double(xg),double(yg),'natural');
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.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/259887/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/259887/image.jpeg)
0 Commenti
Risposta accettata
KSSV
il 6 Gen 2020
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Interpolation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!