I need to repeat a word using a loop
1 view (last 30 days)
Show older comments
Thishan Dharshana Karandana Gamalathge
on 17 Mar 2018
Commented: Thishan Dharshana Karandana Gamalathge
on 17 Mar 2018
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.
0 Comments
Accepted Answer
KALYAN ACHARJYA
on 17 Mar 2018
Edited: KALYAN ACHARJYA
on 17 Mar 2018
for a=1:7
fprintf('\nHello'); %\n for new line
end
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!