Concatenate numbers with separation

Hello,
I have an issue to concatenate 2 two values :
I have L=[1:243]
With another function, i get 2 numbers, I and J.
I would like to concatenate L(I) and L(J) with a message or a symbol:
L(I)= L(I) "and" L(J)
L(J)=0;
Basically, I want to look at L after several iteration of finding I and J and be able to recognise which numbers got paired together.
Sorry if I'm not clear enough, I very recently got back to matlab and never really used strings.
Thanks in advance for your help.

回答 (1 件)

madhan ravi
madhan ravi 2020 年 7 月 7 日
編集済み: madhan ravi 2020 年 7 月 7 日

0 投票

string(L(I)) + "AND" + string(L(J)) % where L(I) and L(J) are column vectors
%or
doc sprintf

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2020 年 7 月 7 日

編集済み:

2020 年 7 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by