Convert Excel to Timetable

I have a question for my uni project. I am pretty new to matlab as well.
So i am reading an excel sheet with following code:
function Auswertung3()
[filename, pathname] = uigetfile('*.xlsx', 'Bitte Datei aussuchen');
[Data, ~, rawData] = xlsread(fullfile(pathname, filename));
Now i want to convert that excel file into a timetable? Can someone help me with that?
I attached the excel sheet as well, so the format should be the same just as timetable, and it should save the timetable in the workspace.
Thanks in advance!!

回答 (2 件)

Star Strider
Star Strider 2021 年 2 月 21 日

0 投票

‘I attached the excel sheet as well ...
Not yet.
The readtimetable function may be appropriate if you have R2019a or later.
Benedikt Skurk
Benedikt Skurk 2021 年 2 月 21 日

0 投票

You are right! Here is the sheet

4 件のコメント

Walter Roberson
Walter Roberson 2021 年 2 月 21 日
readtable() and then table2timetable()
Benedikt Skurk
Benedikt Skurk 2021 年 2 月 21 日
i am sorry i cant figure it out.
what am i putting in the brackets?
Walter Roberson
Walter Roberson 2021 年 2 月 22 日
t = readtable('Leit... xlsx') ;
tt = table2timetable(t) ;
Benedikt Skurk
Benedikt Skurk 2021 年 2 月 22 日
If i do that i just get the errors:
Error using table2timetable
Input table must contain datetime or duration vector for row times.
Error in Auswertung3
TT = table2timetable(T);

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

質問済み:

2021 年 2 月 21 日

コメント済み:

2021 年 2 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by