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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sofiane benhamza
am 21 Sep. 2020
Kommentiert: Ameer Hamza
am 23 Sep. 2020
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>
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 21 Sep. 2020
Use fprintf()
for k=1:20
fprintf('<div> DIV %d </div>\n',k)
end
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!