How to connect random points with a line

I have a very large excel sheet where I extract each point with the following code
x = xlsread ('Sheet.xlsx','F3:F3)
y = xlsread ('Sheet.xlsx','G3:G3')
x1 = xlsread ('Sheet.xlsx','A3:A3)
y1 = xlsread ('Sheet.xlsx','B3:B3')
when I write the code
plot (x,y) they are not connected with a line even with adding ('-'), the reason I need the line to show the relationship between the points of data I also used scatter (x,y) with no line
any ideas on how to get the line drawn between the points

 Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Mayo de 2016
Your ranges are each individual cells. When you plot(x,y) you are plotting one single point. Try
plot([x,x1], [y,y1])

Más respuestas (1)

Preguntada:

el 28 de Mayo de 2016

Respondida:

el 28 de Mayo de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by