When I run my scripts (regardless of whether I run them from the editor [which I rarely use] or the command line) *ALL* of the function calls in my script (I usually have dozens) get echoed onto the command window. Is there any way to deactivate thi
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When I run my scripts (regardless of whether I run them from the editor [which I rarely use because all the "features" are terribly annoying] or the command line) *ALL* of the function calls in my script (I usually have dozens) get echoed onto the command window. Is there any way to deactivate this feature? This new "thing" (I just installed R2018B) is EXTREMELY disruptive. I've poked around other help/question/forums, and all I can find is a workaround using a editor command option that I can't find on my version of Matlab (the suggested workaround was for version R2013?... I don't remember the exact version). The 'echo' command only seems to disable this if I use "echo off all", which isn't an acceptable solution, as I need to see some output during the run. If I use "echo <funcname> off", where <funcname> is an actual function name that is in my script, there is no change: the function name still gets echoed onto the command screen.
PLEEESSSSEEE help with this!!!!
0 commentaires
Réponses (1)
Steven Lord
le 5 Avr 2019
The behavior you've described sounds like you called echo on all at one point and never turned it off with echo off all. However, it's not clear to me why you need to use echo in this case. You can display output without toggling the echo state using functions like disp or fprintf, or by simply leaving off the semicolon at the end of a statement. If you're using echo to try to debug your code, I would use the debugging tools built into MATLAB rather than trying to improvise your own using echo.
2 commentaires
Steven Lord
le 6 Avr 2019
Try
echo off all
and rerun your code. If that works try checking if you have a startup.m file and if so if it has an echo call in it, or start a fresh session of MATLAB and run this command before doing anything else.
dbstop in echo
You can't actually stop in the echo built-in function, but as the documentation for dbstop states: "If file is not a MATLAB code file (for instance, it is a built-in or MDL-file), then MATLAB issues a warning. MATLAB cannot pause in the file, so it pauses before executing the file." Then run your code and you will stop immediately before calling echo. This should tell you where (in which file) echo is being called.
Voir également
Catégories
En savoir plus sur Install Products 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!