A quick question regarding a plot between two points

Hey all.
So I'm trying to plot a line between two points, the first is [0.05,101] and the second is [0.1,320]. I've tried several ways to do it, and I always run into the problem of the first point on the plot being 0.05 instead of starting at 0 and then plotting the first point at 0.05. Is there a way to make it work in the way I'd like?

 Respuesta aceptada

You can specify the axis limits with the axis function:
D = [0.05,101; 0.1,320];
figure(1)
plot(D(:,1), D(:,2))
axis([0 0.15 0 350])

2 comentarios

Yep, that's it.
Thanks a ton :D
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 5 de Feb. de 2015

Comentada:

el 5 de Feb. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by