Create a string from array by concatenating array elements separated by comma.

2 ビュー (過去 30 日間)
Tapas
Tapas 2012 年 10 月 31 日
I have an array like a=[ p q r]. I want to convert the array to a string like s='p,q,r'.Can any one help me please?
Thanks,Tapas

採用された回答

Matt Fig
Matt Fig 2012 年 10 月 31 日
編集済み: Matt Fig 2012 年 10 月 31 日
a = [7 8 9]
S = sprintf('%i,',a);
S = S(1:end-1)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by