When a function is invoked, how do you supress the "ans = ... " output? I have a semicolon on every single line in the function and yet I still get the "ans" output!
Afficher commentaires plus anciens
I wrote a MATLAB function that finds a root and then prints out the results to the command window using fprintf. After it is invoked in the main program, it prints out the results as it should and then, for some reason I don't understand, it prints an intermediate value of an array: ans = 2.3054666 2.599991 ... I have a semicolon at the end of every single line in the function and yet I still get the "ans" output! Can anyone explain how to suppress all output except for that which I specify in the function? Can this be done in MATLAB? Thanks
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Whos dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!