フィルターのクリア

Reading string within a string

1 回表示 (過去 30 日間)
jinang patel
jinang patel 2019 年 11 月 12 日
回答済み: David Hill 2019 年 11 月 12 日
Hello,
Is it possible to do the following:
a='userinput' % string
b={'problem.a', 'problem1.a'.....'problemn.a'}
% fuction/conversion? convertStringsToChars doesnt recognize .a as string!!
I want it to be read as b={'problem.userinput'.....'problemn.userinput'}
Thanks,
Jinang

採用された回答

David Hill
David Hill 2019 年 11 月 12 日
b={sprintf('problem.%s',a),sprintf('problem1.%s',a)};

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by