How to plot a horizontal line?
Mostrar comentarios más antiguos
My function is just y=2050 and I need to plot it w/o using "yline", because it's not a graph, actually. I just type this:
x=[0:0.1:110];
y=[0:10:2060];
g=2050;
plot(x,g)
And I don't get anything. Like, completely anything:

And also after that I need to mark a point (100,2050) and be able to make it bigger than my graph.
How do I solve these problems?
Respuesta aceptada
Más respuestas (2)
darova
el 12 de Mayo de 2020
1 voto
Try this

5 comentarios
Mikhail Konovalov
el 13 de Mayo de 2020
darova
el 13 de Mayo de 2020
plot(x,g+x*0)
Mikhail Konovalov
el 13 de Mayo de 2020
darova
el 13 de Mayo de 2020
Can you make a simple sketch of the result you expect?
Mikhail Konovalov
el 13 de Mayo de 2020
y = 0:0.1:110;
x = 2050.* ones(length(y));
plot(y,x)
xlim([1 110])
1 comentario
Mikhail Konovalov
el 13 de Mayo de 2020
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
