フィルターのクリア

How to fit the grid to a mesh with voids?

2 ビュー (過去 30 日間)
Ceren GURKAN
Ceren GURKAN 2014 年 7 月 19 日
編集済み: Neha Talnikar 2014 年 7 月 23 日
Hello everybody,
I have a mesh that includes some voids in. I would like to create a grid to represent that mesh but when I use mesh grid with X and Y coordinates given; the grid created goes through the voids as well :( Any ideas how to create a grid that fits to my mesh and leave blank the voids I have in the original mesh??

回答 (1 件)

Neha Talnikar
Neha Talnikar 2014 年 7 月 23 日
編集済み: Neha Talnikar 2014 年 7 月 23 日
When working with “meshgrid” or “griddata”, it is required that it is a full grid. Any voids would have to be replaced by a NaN.
You could use “scatteredInterpolant” class for your question and replace the voids with a value, example, NaN. The interpolation method depends on the problem you are trying to solve and you can set properties of the class object to achieve this.
You can look at the Replacement of Sample Values in the examples section of the documentation for help on replacing values.

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by