How to produce a series of strings?

1 次查看(过去 30 天)
I want to produce a matrix of strings. Columns are marked as numbers (0 1 2 3 4 ...) and rows as letters (A B C D ...) the matrix shows as: [A0, A1, A2, A3, ...; B0, B1, B2, B3, ...; C0, C1, ....; ....] How should I done it?

采纳的回答

Sean de Wolski
Sean de Wolski 2018-7-6
string(('A':'E')')+(1:5)
  3 个评论
Sean de Wolski
Sean de Wolski 2018-7-6
编辑:Sean de Wolski 2018-7-6
Hi Ocder,
I can, but it would actually sound better and be more likely to be acted on coming from you(!). File a simple tech support enhancement request through the support center or MATLAB desktop with your wishes. Dev/Doc is more likely to listen to customers than pesky application engineers :)
OCDER
OCDER 2018-7-6
Haha. Sounds fair. I'll go ahead and send in a request.

请先登录,再进行评论。

更多回答(1 个)

OCDER
OCDER 2018-7-6
STR = strings(10, 10);
for r = 1:10
for c = 1:10
STR(r, c) = string(char(('A'+r-1))) + (c-1);
end
end

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by