How to use disp in matlab?
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Daniel Niu
le 10 Sep 2023
Réponse apportée : Walter Roberson
le 11 Sep 2023
disp('Solutions for f''(x) = 0:');
Dear friend, I have some trouble with disp. why in the above code, the result is Solutions for f'(x) = 0:
how to display f''(x) using disp
Your help would be highly appreciated!
0 commentaires
Réponse acceptée
Walter Roberson
le 11 Sep 2023
disp('Solutions for f''''(x) = 0:');
disp("Solutions for f''(x) = 0:");
That is, inside a ' ' (apostrophe) delimited character vector, a single ' ends the character vector and '' (two ' in a row) results in a single ' in the character vector.
Inside a " " (double-quote) delimited character vector, each ' is literal, just a plain character -- but a single " (double-quote) ends the string and "" (two double-quote in a row) results a single " in the string.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Argument Definitions 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!