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

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 件)

カテゴリ

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

製品

タグ

質問済み:

2012 年 10 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by