Read Variables with assigned values from excel into Matlab
古いコメントを表示
I want to read variables with assigned values from excel file (in multiple sheets) into Matlab. In the below snip Var1, Var2 and Var 3 have assigned values 10,5 and 21 respectively.
Kindly inform if it is possible. Thank You.

採用された回答
その他の回答 (1 件)
KSSV
2021 年 2 月 4 日
file = 'test.xlsx' ;
T = readtable(file) ;
vars = T.(2) ;
vars(isnan(vars))=[] ;
vars
6 件のコメント
Ajiket Patil
2021 年 2 月 4 日
KSSV
2021 年 2 月 4 日
The given code exactly does what you want.
vars(1) % this is vars1
vars(3) % this is vars3
.
.
.
vars(i)
Ajiket Patil
2021 年 2 月 4 日
Ajiket Patil
2021 年 2 月 4 日
KSSV
2021 年 2 月 4 日
I got the question...my point is there is no meaning in assigning the variables like you want. It is not required.
Ajiket Patil
2021 年 2 月 4 日
編集済み: Ajiket Patil
2021 年 2 月 4 日
カテゴリ
ヘルプ センター および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
