Hi every one,
i have data in many excell scheets. I wrote a code to read the sheets:
numVars = 6;
VarSheet=1 ;
varNames = {'Date','Time','M1','T1','L1','L2'} ;
varTypes = {'char','char','char','double','double','double'} ;
dataRange = 'A8:F47';
opts = spreadsheetImportOptions('NumVariables',numVars,'VariableNames',varNames,'VariableTypes',varTypes,'DataRange', dataRange...
'Sheet',VarSheet);
% preview('VergleichsmessungSep3.xlsx',opts)
Meas1 = readtable('Test.xlsx',opts);
How could read Date and Time coulmns and use it for plots?

 採用された回答

Jan
Jan 2019 年 4 月 29 日
編集済み: Jan 2019 年 4 月 29 日

1 投票

What about:
varTypes = {'datetime','datetime','char','double','double','double'} ;
What exactly does "use it for plots" mean?

3 件のコメント

Jan
Jan 2019 年 4 月 29 日
[MOVED from section for answers] Rica wrote:
the goal is to build a datetime Array from Column 1 and column 2. This Array will be used in ploting data in a graphics.
I think your hint to use datetime instead of Char will help me solve this task.
Thank you Jan.
Jan
Jan 2019 年 4 月 29 日
@Rica: I'm glad if I could help you.
Please post comments in the section for comments.
Rica
Rica 2019 年 4 月 30 日
Thanks,
I solve it like this:
DT=Date+timeofday(Time).

サインインしてコメントする。

その他の回答 (1 件)

KSSV
KSSV 2019 年 4 月 29 日

1 投票

T = readtable('Test.xlsx') ;

質問済み:

2019 年 4 月 29 日

コメント済み:

2019 年 4 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by