4D Interpolation scattered Data

21 ビュー (過去 30 日間)
Alexander Schwarzwälder
Alexander Schwarzwälder 2020 年 11 月 22 日
コメント済み: Hau Trien 2022 年 5 月 23 日
Hi,
I have a set of all Coordinate Points (x,y,z) of my irregular shaped geometry and I have a set of data (xc,yc,zc,C) with C = value of interest. I want now to determine for every x,y,z of my geometry the value C.
I tried using but the results are not what i want:
[XXCoor, YYCoor, ZZCoor]=meshgrid(xc, yc, zc)
Cm = griddata(xc,yc,zc,C,XXCoor,YYCoor,ZZCoor);
scatter3(XXCoor(:),YYCoor(:),ZZCoor(:),4,Cm(:),'filled');
for illustration here is one picture with the datapoints x,y,z and one picture of plot what I tried. Like you can see the geometry is a facemask and i want C only on the facemask and not in the inner volume.
Maybe you can help me
best regards , Alex
  3 件のコメント
Alexander Schwarzwälder
Alexander Schwarzwälder 2020 年 11 月 23 日
編集済み: Alexander Schwarzwälder 2020 年 11 月 23 日
Attached are the files xyz.csv in the form of x|y|z coordinates of my geometry and the file Values in the form of x|y|z|Value (Humidity).
I want to find a Value for each x|y|z of the geometry given by xyz.csv.
If file xyz.csv is too large simply delete more lines. I delted already a lot but I do not want to lose the characteristics of the geometry as well.
Thanks for the fast reply!
PS: The few coordinates of the file Values.csv are not represented exactly by a value in xyz.csv but the coordinates are in the geometry.
Alexander Schwarzwälder
Alexander Schwarzwälder 2020 年 11 月 23 日
something that migth work bette ris the scatterInterpolant but I did not understand it completely in my case.

サインインしてコメントする。

採用された回答

Alexander Schwarzwälder
Alexander Schwarzwälder 2020 年 11 月 23 日
編集済み: Alexander Schwarzwälder 2020 年 11 月 23 日
Hi guys, somehow I found the solution I want by a lot of experimenting :D At least it looks like something I want.
F = scatteredInterpolant(Xcoor, Ycoor, Zcoor,Cvapor);
scatter3(px,py,pz,4,F(px,py,pz),'filled');
I really appriciate your quick response to the post!
  2 件のコメント
Nora Khaled
Nora Khaled 2020 年 11 月 23 日
looks really nice
Hau Trien
Hau Trien 2022 年 5 月 23 日
I am doing the similar thing and just found your comment here. What are your px, py, pz in this case?

サインインしてコメントする。

その他の回答 (1 件)

John D'Errico
John D'Errico 2020 年 11 月 23 日
Sorry, but you cannot use tools like griddata or scatteredInterpolant to interpolate non-single valued relations. It seems all you have are a set of scattered points from some general manifold embedded in R^3.
You probably need to work with the surface, perhaps as generated from a CRUST algorithm.

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by