plot 3d surface from 3d mode vectors
1 次查看(过去 30 天)
显示 更早的评论
Hi all
I have to plot a surface representing the mode shape of a slab. I have the vectors that represent the movement of certain points on the slab. Some of this points have only a "z" ( vertical) component, others have also "y" ( lateral).
I am able to plot the surface when my vectors have only a vertical component, but when the point has to follow two components, I dont know what to do. Below what I do for vertical only. any comments or help will be much appreciated!
% code
while i<n
vector=[matrix with the vectors for vertical displacements)
bW=4.25
sOf=1.5
x = [98 98 98 73.50 24.5 73.5 73.5 49.0 49.0 49.0 24.5 24.5 81.6 12.40 0 0 0].';
y = [bW/2 bW/2+sOf bW/2-sOf bW/2 bW/2 bW/2-sOf bW/2+sOf bW/2+sOf bW/2-sOf bW/2 bW/2+sOf bW/2-sOf bW/2 bW/2 bW/2 bW/2+sOf bW/2-sOf].';
[X,Y] = meshgrid(min(x):1:max(x),min(y):1:max(y));
modeShapeFunction = fit([x,y], vector(:,i),'cubicinterp');
surface_fdd = modeShapeFunction(X,Y);
surface_fdd = surface_fdd/max(max(abs(surface_fdd)));
surf(X,Y,surface_fdd)
shading interp
axis equal
view([-220 35])
end
2 个评论
回答(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!