Simple way to wrap quotes around input

3 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by