Importing excel data to Matlab.
Mostrar comentarios más antiguos
I am importing a data set from an Excel file into MATLAB to plot it and ID max, min and period. The code is working fine but MATLAB is reading the data as the row number, and not as the values inside each cell. For example, instead of my period being 12 sec (as it should be) it is 60, because one peak is in row 61 and the next in row 121. I hope that makes sense.
3 comentarios
jonas
el 2 de Sept. de 2018
Can you attach the file and briefly explain what your desired output is?
Ricardo Whitaker
el 2 de Sept. de 2018
Editada: Walter Roberson
el 2 de Sept. de 2018
Ricardo Whitaker
el 2 de Sept. de 2018
Respuestas (1)
Walter Roberson
el 2 de Sept. de 2018
Your X values appear to be in fractions of days. To convert to seconds:
X = xlsread('Loop Calculation','A2:A302') * (24 * 60 * 60)
3 comentarios
Ricardo Whitaker
el 2 de Sept. de 2018
Walter Roberson
el 2 de Sept. de 2018
X(MaxTime)
Y(MaxTime)
Ricardo Whitaker
el 3 de Sept. de 2018
Categorías
Más información sobre Spreadsheets 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!