disp(‘hello world’);
79 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
disp (‘hello world’);
2 commentaires
Walter Roberson
le 2 Août 2025
That is incorrect. The function hello does not accept any input parameters, and does not return any outputs.
Réponse acceptée
Chris
le 27 Jan 2023
Modifié(e) : Chris
le 27 Jan 2023
disp ('hello world');
Your apostrophes are wrong. How did you generate them? Here is your version:
disp (‘hello world’);
You could also use double quotes: " "
1 commentaire
DGM
le 4 Août 2025
Modifié(e) : DGM
le 20 Août 2025
This is a common problem that happens when people copy-paste code that's presented on websites that use prettytext formatting. I don't know if there are other issues with localization that could cause the same thing, but there are countless websites full of curly-quoted code. It's up to you to watch out for bad quotes, hyphens, and spaces.
It doesn't show up in the forum editor, but these invalid characters should be highlighted by your editor.

Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Graphics Object Programming dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!