Problem 42482. Repeat string n times
- You will be provided a string (s = 'string1_')
- a starting point (num1 = 6) (always bigger than or equal to zero)
- and n (n = 3) (always bigger than or equal to 1)
You will return following in sequence;
{'string1_6'
'string1_7'
'string1_8'}
You can not use for or while loops
Solution Stats
Problem Comments
-
1 Comment
Christian Schröder
on 25 Oct 2022
Your first test is too strict: it trips when you invoke arrayfun(..., "UniformOutput", false).
Solution Comments
Show commentsProblem Recent Solvers45
Suggested Problems
-
given 3 sides, find area of this triangle
818 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1301 Solvers
-
Find the sum of the elements in the "second" diagonal
1199 Solvers
-
Matrix multiplication across rows
393 Solvers
-
Matlab Basics - Convert a row vector to a column vector
675 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!