Filter löschen
Filter löschen

Generate surface from boundary points

3 Ansichten (letzte 30 Tage)
Michael
Michael am 20 Mär. 2024
Beantwortet: Voss am 20 Mär. 2024
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 Kommentare
Dyuman Joshi
Dyuman Joshi am 20 Mär. 2024
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).
Michael
Michael am 20 Mär. 2024
What sorts of details and restrictions?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Voss
Voss am 20 Mär. 2024
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')

Community Treasure Hunt

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

Start Hunting!

Translated by