Borrar filtros
Borrar filtros

I need to repeat a word using a loop

1 visualización (últimos 30 días)
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.

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 17 de Mzo. de 2018
Editada: KALYAN ACHARJYA el 17 de Mzo. de 2018
for a=1:7
fprintf('\nHello'); %\n for new line
end
  1 comentario
Thishan Dharshana Karandana Gamalathge
This is acceptable. However, at the end of last "Hello" the icon ">>" follows.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by