Apostrophes in Cell

How do I save a string to a cell that is in apostrophes?
ie. 'filename', not filename

답변 (2개)

Jan
Jan 2011년 4월 6일

1 개 추천

If '''filename''' looks too confusing, e.g. when posting code in a forum:
quote = char(39);
abc = {[quote, 'filename', quote]}
Matt Fig
Matt Fig 2011년 4월 6일

0 개 추천

Use a double apostrophe everywhere you want one.

댓글 수: 1

Walter Roberson
Walter Roberson 2011년 4월 6일
Right. So in order to use that string itself, you would use
abc = '''filename''';

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품

질문:

2011년 4월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by