What happens in response to fprintf commands when a deployed app is created using deploytool?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ranjan Sonalkar
le 26 Déc 2017
Commenté : Walter Roberson
le 6 Juin 2018
I am creating an App for others to use the matlab code, using deploytool. I have a couple of questions.
1. What happens if I am using the fprintf commands since there is no MATLAB window to print in response to this command?
2. My code runs fine in the MATLAB environment. However, when I run the app created by deploytool, it bombs with no indication of where it did so? How can I debug this error since debug flags cannot be used here?
0 commentaires
Réponse acceptée
Benjamin Kraus
le 26 Déc 2017
You can specify a file identifier (created using fopen) as the first input to fprintf, which will send the output to a file. If you don't specify the file, then fprintf should send all it's output to "standard out", which should be the command line you used to launch your App. If you started the App by double-clicking the executable, I don't believe the output is sent anywhere, so if you want to capture that output you need to start your App from a terminal or command window (the details depends on your operating system).
5 commentaires
Plus de réponses (1)
Ranjan Sonalkar
le 6 Juin 2018
3 commentaires
Walter Roberson
le 6 Juin 2018
I do not use deploytool myself, but it appears to me that if you ask to use the application compiler, and go to the Settings icon, then there is a field for addition settings to be passed to MCC. If you put
-m
there, then I think it will create a console program. But possibly I am misreading and you might need -e instead of -m
Voir également
Catégories
En savoir plus sur Environment and Settings 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!