필터 지우기
필터 지우기

Unable to plot data from .xlsx

조회 수: 1 (최근 30일)
Shweta Kiran
Shweta Kiran 2022년 8월 17일
이동: Voss 2022년 8월 19일
I want to plot data from .xlsx (or .csv) file. I have used the following code. earlier I had also used round braces in line 2 and 3 but that didn't work as well. It gave the error message "Tables and timetables do not have a plot method. To plot a table or a timetable, use the stackedplot function. As an alternative, extract table or timetable variables using dot or brace subscripting, and then pass the variables as input arguments to the plot function." After using curly braces now the error message is "Error using plot Invalid data argument." The data file has around 2 Million *22 enteries. Any function that converts it into a matrix would be helpful. Thanks in advance
T =readtable('PuneAQMNew_22.xlsx');
Time=T{:,16};
AirQuality= T{:,2};
plot(AirQuality,Time,'r')
legend('Airquality')
  댓글 수: 9
Shweta Kiran
Shweta Kiran 2022년 8월 19일
이동: Voss 2022년 8월 19일
I have csv and xlsx files for the same data. If I use the csv file the script runs fine whereas it shows the errors mentioned above for the xlsx files. The class type of Air Quality is double and time is duration in the csv file.
Walter Roberson
Walter Roberson 2022년 8월 19일
이동: Voss 2022년 8월 19일
Please attach a short extract of the file, including any headers that are present.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Timetables에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by