Apostrophes in Cell

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

Risposte (2)

Jan
Jan il 6 Apr 2011

1 voto

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

0 voti

Use a double apostrophe everywhere you want one.

1 Commento

Walter Roberson
Walter Roberson il 6 Apr 2011
Right. So in order to use that string itself, you would use
abc = '''filename''';

Accedi per commentare.

Categorie

Prodotti

Richiesto:

il 6 Apr 2011

Community Treasure Hunt

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

Start Hunting!

Translated by