plot 3d surface from 3d mode vectors
조회 수: 2 (최근 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!