Importing excel data to Matlab.
이전 댓글 표시
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
jonas
2018년 9월 2일
Can you attach the file and briefly explain what your desired output is?
Ricardo Whitaker
2018년 9월 2일
편집: Walter Roberson
2018년 9월 2일
Ricardo Whitaker
2018년 9월 2일
답변 (1개)
Walter Roberson
2018년 9월 2일
Your X values appear to be in fractions of days. To convert to seconds:
X = xlsread('Loop Calculation','A2:A302') * (24 * 60 * 60)
댓글 수: 3
Ricardo Whitaker
2018년 9월 2일
Walter Roberson
2018년 9월 2일
X(MaxTime)
Y(MaxTime)
Ricardo Whitaker
2018년 9월 3일
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!