MATLAB Answers

extracting timetable variables as array

조회 수: 10(최근 30일)
Sehoon Chang
Sehoon Chang 2 Sep 2020
댓글: Sehoon Chang 3 Sep 2020
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
Sehoon Chang
Sehoon Chang 3 Sep 2020
thank you both for your comment! :)

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

채택된 답변

VBBV 3 Sep 2020
tempC = timetable_csv{:}{2};
windspeed = timetable_csv{:}{3};
timestamp = timetable_csv{:}{1};
  댓글 수: 1
madhan ravi
madhan ravi 3 Sep 2020
Please format your code by pressing the code button.

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by