Marker between two points

1 visualización (últimos 30 días)
TheDice
TheDice el 28 de Abr. de 2021
Respondida: Shubham Khatri el 3 de Mayo de 2021
Hello is there for the marker the function that the not only appears when I click on the measuring points but also when I click somewhere between the measuring points on the straight line?
This is my example:
x = (1:10);
y = randi([1 10],1,10);
app.s = plot(app.UIAxes,x,y,'-o');

Respuesta aceptada

Shubham Khatri
Shubham Khatri el 3 de Mayo de 2021
Hello,
You may not be able to do this with these limited set of values. If you want to place marker on the place of your click, you need to define the plot with more points. To explain this, please take a look at this code below.
x = (1:0.001:10); %defining a large number of points instead of 10
y = sin(x); % a continuous function
plot(x,y,'-o');
Also, you can refer to this community answer for your support.
Hope it helps

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by