Filter löschen
Filter löschen

Apostrophes in Cell

4 Ansichten (letzte 30 Tage)
Sam Falzone
Sam Falzone am 6 Apr. 2011
How do I save a string to a cell that is in apostrophes?
ie. 'filename', not filename

Antworten (2)

Jan
Jan am 6 Apr. 2011
If '''filename''' looks too confusing, e.g. when posting code in a forum:
quote = char(39);
abc = {[quote, 'filename', quote]}

Matt Fig
Matt Fig am 6 Apr. 2011
Use a double apostrophe everywhere you want one.
  1 Kommentar
Walter Roberson
Walter Roberson am 6 Apr. 2011
Right. So in order to use that string itself, you would use
abc = '''filename''';

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Cell Arrays finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by