plot 3d surface from 3d mode vectors

1 vue (au cours des 30 derniers jours)
Henar Martín-Sanz
Henar Martín-Sanz le 14 Sep 2017
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 commentaires
KSSV
KSSV le 15 Sep 2017
Give all the variables......_bw_ sOf etc are missing...
Henar Martín-Sanz
Henar Martín-Sanz le 15 Sep 2017
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.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by