Plot cut line on a surface

4 vues (au cours des 30 derniers jours)
Vishal Dolas
Vishal Dolas le 8 Fév 2021
Commenté : darova le 11 Fév 2021
Can someone please help me plotting the data from these cut lines over a 1d line graph?
I have attached my code.

Réponses (1)

Kiran Felix Robert
Kiran Felix Robert le 11 Fév 2021
Hi Vishal,
You can use the plot3 function to add cut line to your plot. The following Is an example, replace the second figure with the following code to see the cutlines.
%% Use you code upto end of figure 1 then add the following instead of your code
figure(2);
colormap(jet)
ax = gca;
surf(ax,XX,YY,VTHETA)
shading interp
pbaspect([(max(max(r))-min(min(r))) L_const 1])
colorbar('location','EastOutside');
title('Circumferential Velocity (v_\theta) (m/sec)');
caxis([0 0.4]);
view(0,90)
% Adding the Cut Lines
hold(ax,'on')
plot3(ax,[0.004,0.006],[0.00187,0.00150],[1,1],'k','LineWidth',3);
plot3(ax,[0.008,0.011],[0.01387,0.01350],[1,1],'k','LineWidth',3);
hold(ax,'off')
% End of Cut lines
  2 commentaires
Vishal Dolas
Vishal Dolas le 11 Fév 2021
Hello,
Thanks it is working but real problem is not about plotting a cut line but I want to get data from that cut line and plot on a line graph. Can you please help me with that?
something like this-
darova
darova le 11 Fév 2021
Use interpolation (interp2) to get value of the line

Connectez-vous pour commenter.

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by