quick question about string read

조회 수: 1 (최근 30일)
UTA
UTA 2013년 2월 13일
I use 'sprintf' function get a string and store in a1 as follow: % a1 = sprintf('%s_%s', 'modelsq', '1');
I just want to load the mat file which name is modelsq_1, however, it is fail to do like this: % load a1; how should I do? thank you very much!

채택된 답변

José-Luis
José-Luis 2013년 2월 13일

추가 답변 (1개)

Matt Kindig
Matt Kindig 2013년 2월 13일
Use the functional form of load, i.e.
load(a1);

카테고리

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

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by