my pc name is (user's pc) how to pass in run function ?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Divyesh pandav
le 29 Sep 2021
Commenté : Divyesh pandav
le 1 Oct 2021
code:
run 'C:\Users\user's PC\Desktop\test.m'
Error: Character vector is not terminated properly.
0 commentaires
Réponse acceptée
Plus de réponses (2)
Image Analyst
le 29 Sep 2021
That's too many apostrophes (three). The string ends at the second one.
If you need an apostrophe in the path, use double quotes "
"C:\Users\user's PC\Desktop\test.m"
2 commentaires
Image Analyst
le 29 Sep 2021
If you want to run the m file, set the Current folder to the folder where the text.m lives and do
>> test
No need to type "run" before it.
Or double click on it in the Current folder panel to bring it up in a text editor, and click the green Run triangle on the Tool ribbon.
0 commentaires
Voir également
Catégories
En savoir plus sur Data Type Conversion 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!