plotting imported excel data containing date

조회 수: 1 (최근 30일)
Suaad Zakwani
Suaad Zakwani 2020년 2월 12일
댓글: Suaad Zakwani 2020년 2월 12일
Hello,
I am trying to plot a data imported excel data containing date column and a value
-------------------------------------
clear all
dataset = readtable('Manah.xlsx');
z = table2timetable(dataset);
x= dataset(:,1);
y= dataset(:,2);
plot (x,y)
---------------------------------------
and this erro shows up:
Error using tabular/plot
Too many input arguments.
  댓글 수: 2
BN
BN 2020년 2월 12일
편집: BN 2020년 2월 12일
Hello try this:
clear
dataset = readtable('Manah.xlsx');
%if column1 is your date column (insert variablename instead of column 1 and 2)
dateset.Column1 = datetime(dateset.Column1,'InputFormat','dd.MM.yyyy hh:mm:ss:SSS');
dataset.Column2 = str2double(dateset.Column2);
z = table2timetable(dataset);
plot(z.Column1,z.Column2)
Suaad Zakwani
Suaad Zakwani 2020년 2월 12일
Thanks alot,
I modified it a bit and it worked

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by