Simple way to wrap quotes around input

1 回表示 (過去 30 日間)
Marco Bakker
Marco Bakker 2016 年 10 月 21 日
回答済み: Thorsten 2016 年 10 月 21 日
How to wrap quotes ('...') around a user input string?

採用された回答

Image Analyst
Image Analyst 2016 年 10 月 21 日
One way:
str = sprintf('''%s''', usersString)

その他の回答 (1 件)

Thorsten
Thorsten 2016 年 10 月 21 日
str = ['''' str ''''];

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by