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 visualizzazioni (ultimi 30 giorni)
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!!!!

Risposte (1)

Steven Lord
Steven Lord il 5 Apr 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 Commenti
Christian Poppeliers
Christian Poppeliers il 5 Apr 2019
Actually, the 'echo' command was the first thing I suspected. I've verified that 'echo' is NOT called anywhere in the script, nor is it being toggled anywhere, in the script, in the command window, etc. This is the weirdest thing I've run across in quite a while...
Steven Lord
Steven Lord il 6 Apr 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.

Accedi per commentare.

Categorie

Scopri di più su Install Products in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by