필터 지우기
필터 지우기

generating a variable name using a file name selected

조회 수: 1 (최근 30일)
Asl
Asl 2013년 10월 20일
편집: Image Analyst 2013년 10월 20일
Hallo, I select a file >>>> ABC.xls [FileName,wfolder] = uigetfile({'*.xlsx'});
FileName returns the name of the file >>>> ‘ABC.xls’ I want to use the name of the file as a part of a variable name. Veriable >>>>> A = [1 2 4 7 ] I want to generate a a new variable A_ABC and assign it a vales of A A_ABC = [1 2 4 7 ] How can I do this? Thanks

답변 (1개)

Image Analyst
Image Analyst 2013년 10월 20일
편집: Image Analyst 2013년 10월 20일
You'd have to use dynamic structure names: http://www.mathworks.com/matlabcentral/answers/32416#answer_40979, or use eval() though eval is usually recommended against.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by