Generate surface from boundary points
16 ビュー (過去 30 日間)
古いコメントを表示
I have thickness measurements of a rectangular test specimen. These measurements can only be taken at the boundary, but I would like to get a rough visualization of what the thickness looks like across the span of the panel using the boundary point measurements. This is a general idea of what data I have now using somewhat random numbers:

Is there any way I can make a surface out of this?
Thanks!
2 件のコメント
Dyuman Joshi
2024 年 3 月 20 日
The surface in between can be of any shape and size. You will have to specify more details or impose more restrictions to get a unique (or a set of unique) solution(s).
回答 (1 件)
Voss
2024 年 3 月 20 日
x = linspace(0,3,6).';
y = linspace(0,1,6).';
nx = numel(x);
ny = numel(y);
zx = 0.134+0.007*rand(nx,2);
zy = [zx(1,1) zx(end,1); 0.134+0.007*rand(ny-2,2); zx(1,2) zx(end,2)];
figure
hold on
plot3(x,y(1)*ones(nx,1),zx(:,1))
plot3(x,y(end)*ones(nx,1),zx(:,2))
plot3(x(1)*ones(ny,1),y,zy(:,1))
plot3(x(end)*ones(ny,1),y,zy(:,2))
view(3)
[X,Y] = meshgrid(x,y);
XE = [X([1 end],:).'; X(2:end-1,[1 end])];
YE = [Y([1 end],:).'; Y(2:end-1,[1 end])];
ZE = [zx; zy(2:end-1,:)];
SI = scatteredInterpolant(XE(:),YE(:),ZE(:));
Z = SI(X,Y);
figure
surf(X,Y,Z,'FaceColor','interp','EdgeColor','none')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

