how can ı plot my plot at certain location ?

7 次查看(过去 30 天)
I have three variable namely; X/D, Y,D, and u/U , let's say want to plot u/U at x/D=1,2 3,4 and I want to plot so that the graph should be seen at x/d =1,2,3,4 at the same graph as it shown in the picture.

回答(1 个)

Ashu
Ashu 2023-3-21
As per my understanding, you want to plot some points over X/D at 1, 2, 3, 4 on an existing plot.
To do that you can do something similar to this
% Define x/D vector
x_D = [1 2 3 4];
% Define matrix of u/U values
u_U = [1 2 3 4 ;
5 6 7 8;
9 10 11 12;
13 14 15 16];
% Plot u/U against x/D
hold on;
plot(x_D, u_U, 'x');
hold off;
To know more about 'hold', you can go through the following documentation :

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by