Apostrophes in Cell
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I save a string to a cell that is in apostrophes?
ie. 'filename', not filename
0 commentaires
Réponses (2)
Jan
le 6 Avr 2011
If '''filename''' looks too confusing, e.g. when posting code in a forum:
quote = char(39);
abc = {[quote, 'filename', quote]}
0 commentaires
Matt Fig
le 6 Avr 2011
Use a double apostrophe everywhere you want one.
1 commentaire
Walter Roberson
le 6 Avr 2011
Right. So in order to use that string itself, you would use
abc = '''filename''';
Voir également
Catégories
En savoir plus sur Cell Arrays dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!