how to plot date and time on x axis and data on yaxis from excel sheet using MATLAB
4 次查看(过去 30 天)
显示 更早的评论
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/200159/Capture.jpeg)
help plot IST on Xaxis and Z on Yaxis?
回答(1 个)
KSSV
2019-1-4
编辑:KSSV
2019-1-4
Read about readtable
T = readtable('BookP.xlsx') ;
plot(T.(1),T.(2)) % Pick the index you want T.(i)
% plot whole data
T = readtable('BookP.xlsx') ;
plot(T.(1),T{:,2:end}) ;
str = properties(T) ;
legend(str)
3 个评论
KSSV
2019-1-4
[num,txt,raw] = xlsread('BookP.xlsx') ;
thedates = datetime(raw(2:end,1)) ;
str = txt(1,2:end) ;
plot(thedates,num)
legend(str)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!