필터 지우기
필터 지우기

hi , i'm trying to make a simple loop which is give me a useless syntax between what i need , please how can i remove ('ans=') thanks anyway

조회 수: 2 (최근 30일)
for k=1:20
sprintf('<div> DIV %d </div>',k)
end
it gives :
ans =
<div> DIV 18 </div>
ans =
<div> DIV 19 </div>
ans =
<div> DIV 20 </div>

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 9월 21일
Use fprintf()
for k=1:20
fprintf('<div> DIV %d </div>\n',k)
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by