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!
