How to plot 3 seperate vectors with irregular geometry?

1 view (last 30 days)
Hey all,
I need a help. I had a cuboid sample (made of wax), then I deformed it that now it has "H"-letter geometry. See, figures below
Thus I have 3 vectors, i.e X nad Y with coordinates and Z with calculated strain. Now, I'd like to make a 3d plot of strain at deformed geometry of the sample. I've been trying different things, but except for function plot3, nothing worked and with the plot3 function it's not readable without rotating the figure. I'd like to have either 3d plot or contour one. The biggest problem, that I couldn't solve is to plot the deformed geometry and to linearize the Z vector (actually, a matrix due to the meshing)
I'd be very grateful if any'd share with me one's tips, suggestions how to solve that problem.
Below, I present what I did so far, but it far away from that I'd like to obtain.
figure x=round(100*rand(100,3)); [XX,YY]=meshgrid(X,Y); [xi,yi,zi]=griddata(X,Y,epsilon_Y,XX,YY); [X1,Y1]=meshgrid(-10:10); w=interp2(xi,yi,zi,X1,Y1); surf(X1,Y1,w) shading interp colorbar hold on plot3(X,Y,epsilon_Y,'o')
I also attach the corresponding vectors:
X=[ -2.7125 -2.3250 -1.8850 -1.4000 -0.8825 -0.3400 0.2250 0.8025 1.3700 1.9100 2.4175 2.8950 3.3325 3.7300 -0.8550 -0.6250 -0.4050 -0.1925 0.0175 0.2225 0.4250 0.6275 0.8300 1.0350 1.2425 1.4550 1.6750 1.9025 -2.6725 -2.3000 -1.8975 -1.4650 -1.0125 -0.5475 -0.0675 0.4325 0.9575 1.4775 1.9725 2.4375 2.8650 3.2525 -2.7125 -2.6100 -2.4100 -1.9125 -1.2600 -0.9200 -0.8550 -0.8625 -0.9800 -1.5375 -2.2200 -2.5175 -2.6250 -2.6725 0.8025 0.8000 0.7825 0.7575 0.7250 0.6750 0.6275 0.6025 0.5850 0.5700 0.5550 0.5325 0.4925 0.4325 3.7300 3.6425 3.4575 2.9650 2.3375 2.0000 1.9025 1.9075 2.0075 2.3025 2.7725 3.1000 3.2125 3.2525];
Y=[ -1.2325 -1.2900 -1.3150 -1.3250 -1.3325 -1.3425 -1.3575 -1.3500 -1.3150 -1.2575 -1.2075 -1.1775 -1.1400 -1.0925 0.7700 0.7525 0.7425 0.7375 0.7350 0.7350 0.7425 0.7600 0.7875 0.8150 0.8350 0.8550 0.8750 0.8925 3.2750 3.3050 3.3200 3.3250 3.3275 3.3400 3.3675 3.3975 3.4075 3.3950 3.3850 3.3850 3.3775 3.3550 -1.2325 -0.9550 -0.7150 -0.5375 -0.2150 0.2875 0.7700 1.2675 1.7375 2.2000 2.4875 2.6975 2.9750 3.2750 -1.3500 -1.1250 -0.8600 -0.5525 -0.2000 0.2225 0.7600 1.3500 1.8600 2.2600 2.5950 2.9000 3.1650 3.3975 -1.0925 -0.8075 -0.5525 -0.3700 -0.0300 0.4625 0.8925 1.3225 1.7675 2.2425 2.5725 2.7800 3.0525 3.3550];
Z= [ 0.1226 0.1976 0.3260 0.3704 0.4426 0.5027 0.5044 0.5081 0.5229 0.4487 0.3974 0.3124 0.2230 0.1245 -0.3593 -0.4579 -0.4677 -0.4718 -0.4738 -0.5379 -0.5167 -0.5383 -0.5047 -0.4770 -0.4812 -0.4411 -0.4001 -0.3353 0.0792 0.1687 0.2290 0.2942 0.3039 0.3210 0.3685 0.4490 0.4669 0.4128 0.3725 0.2558 0.2657 0.1178 0.1059 0.1759 0.3258 0.2534 -0.3735 -0.4865 -0.3573 -0.3919 -0.7383 -0.0710 0.3195 0.1759 0.1103 0.0792 0.5081 0.3480 0.1837 0.0300 -0.0889 -0.2721 -0.5244 -0.5406 -0.2888 -0.0944 0.0274 0.1345 0.2926 0.4490 0.1245 0.1441 0.4351 0.1840 -0.4303 -0.5335 -0.3650 -0.3322 -0.5140 -0.3515 0.1425 0.2458 0.1573 0.1178]

Answers (0)

Community Treasure Hunt

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

Start Hunting!