how can ı plot my plot at certain location ?

6 visualizzazioni (ultimi 30 giorni)
hsnHkl
hsnHkl il 21 Mar 2023
Risposto: Ashu il 21 Mar 2023
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.

Risposte (1)

Ashu
Ashu il 21 Mar 2023
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 :

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by