Filter löschen
Filter löschen

how to plot date and time on x axis and data on yaxis from excel sheet using MATLAB

4 Ansichten (letzte 30 Tage)
Capture.JPG
help plot IST on Xaxis and Z on Yaxis?

Antworten (1)

KSSV
KSSV am 4 Jan. 2019
Bearbeitet: KSSV am 4 Jan. 2019
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 Kommentare
KSSV
KSSV am 4 Jan. 2019
[num,txt,raw] = xlsread('BookP.xlsx') ;
thedates = datetime(raw(2:end,1)) ;
str = txt(1,2:end) ;
plot(thedates,num)
legend(str)

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by