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.

 Risposta accettata

KALYAN ACHARJYA
KALYAN ACHARJYA il 17 Mar 2018
Modificato: KALYAN ACHARJYA il 17 Mar 2018
for a=1:7
fprintf('\nHello'); %\n for new line
end

1 Commento

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by