Hi
i have a timetable imported from excel with undefined number or variables (number of usable variables change depending on situation).
Is there a possibility to extract all the variables with names that are written on top row of timetable as array into MATLAB?
e.g.: tempC = [11, 11, 11, 11, ....]
windspeed = [7.00, 7.00, 7.00, ...]
thanks for your help!

3 Kommentare

It is not recommended to do what you are asking.
You can easily access the individual variables using . notation as follows.
timetable_csv.TempC
Sehoon Chang
Sehoon Chang am 3 Sep. 2020
thank you both for your comment! :)

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

VBBV
VBBV am 3 Sep. 2020

0 Stimmen

tempC = timetable_csv{:}{2};
windspeed = timetable_csv{:}{3};
timestamp = timetable_csv{:}{1};

1 Kommentar

madhan ravi
madhan ravi am 3 Sep. 2020
Please format your code by pressing the code button.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Variables finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by