not displaying answers in command window for this special command
조회 수: 2 (최근 30일)
이전 댓글 표시
for not displaying answers in command window for eval(rrr) , eval(ttt) what i must do?
iterval1='444444';
d=sprintf('m%d',1);
c=sprintf('m%d_%d',1,2);
rr=eval(iterval1(1,1:3));
tt=eval(iterval1(1,5:end));
rrr =sprintf('%s=%d',d,rr);
ttt=sprintf('%s=%d',c,tt);
eval(rrr); % what must i do to not displaying this in command widow
eval(ttt); % what must i do to not displaying this in command widow
댓글 수: 1
Oleg Komarov
2011년 9월 8일
Are you trying to create variables in a loop? Don't do it with eval.
http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F
채택된 답변
추가 답변 (1개)
Walter Roberson
2011년 9월 8일
evalc(rrr); %evalc() to "capture" the result of eval(), then semi-colon means throw it away without displaying it
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Programming Utilities에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!