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 个评论
KSSV
KSSV 2017-9-15
Give all the variables......_bw_ sOf etc are missing...
Henar Martín-Sanz
Henar Martín-Sanz 2017-9-15
Done, I was just trying to keep it simple. The code posted above works, but I need to implement the lateral values; maybe there is a better way to get what I need than using the functions fit and surf.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by