Simple way to wrap quotes around input

조회 수: 2 (최근 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 CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by