Hi, the graph doesn't match my excel datas

The excel datas and figure are as followed,when I tried to turn the excel data into a graph,the xaxis becomes completely different,so how to deal with this problem?Thank you!

1 comentario

Geoff Hayes
Geoff Hayes el 30 de Oct. de 2015
xinran - please post the code that you have written to read the data from the Excel file and the code to plot the data. What are you passing as the x-axis values into plot?

Iniciar sesión para comentar.

Respuestas (1)

Adam
Adam el 30 de Oct. de 2015
Editada: Adam el 30 de Oct. de 2015
You are just plotting y data leaving the default indexing for the x axis by the looks of it.
plot( x, y )
or preferably
plot( hAxes, x, y )
should be used if you want x axis values that match your data.

Categorías

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

Etiquetas

Preguntada:

el 30 de Oct. de 2015

Editada:

el 30 de Oct. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by