I want to say "Hello" seven times. How can I do it using MATLAB? I know how to do it using numbers but not using words.
Thanks.

 Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 17 Mär. 2018
Bearbeitet: KALYAN ACHARJYA am 17 Mär. 2018

0 Stimmen

for a=1:7
fprintf('\nHello'); %\n for new line
end

1 Kommentar

This is acceptable. However, at the end of last "Hello" the icon ">>" follows.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by