Azzera filtri
Azzera filtri

Help with "Kolgomorov Complexity"

1 visualizzazione (ultimi 30 giorni)
Kevin Lai
Kevin Lai il 25 Nov 2015
Risposto: Walter Roberson il 25 Nov 2015
I was tasked with the following and can't really solve it:
1) Design a code that can generate the string: 'abcabcabcabcabcabcabcabcabcabcabcabcd'. --> I know there is a repmat function but how can I use it for char strings? Also, would a for loop help in this case, especially with the additional "letter d" at the end?
2) Design a second code that is even shorter than the first code.

Risposte (1)

Walter Roberson
Walter Roberson il 25 Nov 2015
Hint:
repmat('pqrst', 1, 5)

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by