Info
此问题已关闭。 请重新打开它进行编辑或回答。
how to get a surface from stacking lines(line either grows or shrinks in z direction) from different planes?
1 次查看(过去 30 天)
显示 更早的评论
I want to track a delamination formed in a specimen which grows in the thickness direction. Delamination can either increase or decrease along thickness. I got the data for length of the delamination, using this data I am trying to calculate the volume of delamination by stacking all the data (delamination) along the thickness and forming a surface.

The image contains data of single delamination in two successive slices. I want to stack the delaminations above each slice to form a surface. I tried to plot using plot3 which gives me offset image along Z but not a surface.
0 个评论
回答(1 个)
KSSV
2018-5-23
N = 20 ;
x1 = rand(N,1) ; y1 = rand(N,1) ; z1 = zeros(N,1) ;
[x1,idx] = sort(x1) ; y1 = y1(idx) ;
%
x2 = rand(N,1) ; y2 = rand(N,1) ; z2 = ones(N,1) ;
[x2,idx] = sort(x2) ; y2 = y2(idx) ;
M = 20 ;
X = zeros(N,M) ; Y = X ; Z = X ;
for i = 1:N
X(i,:) = linspace(x1(i),x2(i),M) ;
Y(i,:) = linspace(y1(i),y2(i),M) ;
Z(i,:) = linspace(z1(i),z2(i),M) ;
end
surf(X,Y,Z)
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!