how to make an array of characters of variable length?

5 次查看(过去 30 天)
I want to make an array of unique characters or strings of variable length (n) e.g n=5. so I can't use 'a':'e' cause 'e' is not constant it depends on n which varies continuously ...I don't know the 'e' ....I just know that i want an array e.g from 'a' to a+n
Any help is highly appreciated. Thanks

采纳的回答

Walter Roberson
Walter Roberson 2021-6-12
n=5;
'a':char('a'+n-1)
ans = 'abcde'

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by