필터 지우기
필터 지우기

Exporting workspace variables in excel sheet

조회 수: 9 (최근 30일)
Koustubh Shirke
Koustubh Shirke 2020년 10월 16일
댓글: Stephen23 2020년 10월 16일
Hi,
I have 200 variables in my matlab workspace. how can I export this data into the excel sheet as it is in matlab ?
Variable names should be the headers in the excel sheet.
Thanks in advance !

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 10월 16일
As Stephen mentioned, creating variable names dynamically is not a good coding practice. A better approach will be to create a table(), and column names can be the same as variable names. Then you can simply use writetable() and it will print variable name as the header row of the Excel sheet.
  댓글 수: 1
Stephen23
Stephen23 2020년 10월 16일
"...creating variable names dynamically is not a good coding practice."
Also accessing them dynamically, as in this question.

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

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by