필터 지우기
필터 지우기

Apostrophes in Cell

조회 수: 4 (최근 30일)
Sam Falzone
Sam Falzone 2011년 4월 6일
How do I save a string to a cell that is in apostrophes?
ie. 'filename', not filename

답변 (2개)

Jan
Jan 2011년 4월 6일
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일
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''';

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

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by