R2011b Prints script name in Command Window

When I execute a script from the editor (hitting run or F5), MATLAB prints the name of the script into the Command Window as if I ran the script via the Command Window. It's very annoying for some of the scripts that I use as I need them to output some results into the Command Window. Sometimes I change variables within the script and re-execute, printing out the updated results. It is now very difficult to compare the results with the script name on every other line. Any way to turn this off, or do I have to downgrade (annoying enough to do so)?
Here's what it looks like in the Command Window:
>> Tsolver_12302011
Initial Temp=311, Final Temp=217.932
>> Tsolver_12302011
Initial Temp=300, Final Temp=197.021
Thanks in advance,
Phil

 Respuesta aceptada

Michelle Hirsch
Michelle Hirsch el 5 de En. de 2012

3 votos

Phil - Sorry that this change has been disruptive to your workflow. We made the change intentionally, motivated by precisely what Jan wrote. There is not currently a way to turn off this behavior.
As a workaround, you could use the "Evaluate entire file" button on the second row of the editor toolbar (along with the other buttons for evaluating one cell at a time). If this button doesn't appear, you can right-click on the toolbar to customize it and add the button back.
Hope this helps! - scott

3 comentarios

Jan
Jan el 5 de En. de 2012
Thanks, Scott! It is very helpful to get the an answer from TMW directly.
Although I'd prefer this behaviour, if I use scripts (I prefer functions due to the data encapsulation), it can be disturbing for others. I cannot find the corresponding message in the change-logs.
Whenever some detail is missing in the change-logs, you can be sure, that some users need some hours to find the reason for the changes - and this is wasted time. Therefore I take another chance to repeat my old request: Please, TMW, create a *full* change-log such that a user can easily check, if a certain feature is available in a certain Matlab release. This would reduce the difficulties of updating to a new Matlab release and collaborating with users of other releases. The frequently mentioned backward compatibility of Matlab is excellent for 98% of the features. But in the rare cases of changes or incompatibilities the users suffer from an incomplete documentation.
I have to support Matlab 6.5, 2006a, 2008b, 2009a and 2011b. I'm using a fast C-mex to switch between workarounds for the different releases (FEX: isMatlabVer), but it needs hours to find out the version number for the changes in the behaviour. Of course a change-log database will never cover 6.5 and if you start today, it will be really useful after 2015. But if you do not start today, some users will still run 6.5 in virtual machine in 2015, because they are in fear of incompatibilities.
Phil Kreth
Phil Kreth el 6 de En. de 2012
Scott,
Thank you so much for the response. I had a very strong feeling that this was indeed a new feature intentionally built into R2011b, but I was not sure if there was a method of disabling the echo. I will attempt your method of using the "Evaluate entire file" button tomorrow and simply use that button (I'm a big user of keyboard shortcuts, so I hope that option is in the shortcuts preferences). Again, thanks for taking the time to answer my question - I could only find one other post on this and the changelogs had no mention of it, so I figured I ought to try a post here.
Could you let me know if an on/off option could be built into the preferences for this in a future release?
Thanks,
Phil
Michael Katz
Michael Katz el 6 de En. de 2012
Phil, "Evaluate Entire File" has a customizable shortcut. You can even reassign F5!

Iniciar sesión para comentar.

Más respuestas (2)

Walter Roberson
Walter Roberson el 3 de En. de 2012
Try
echo off all
and make sure that your scripts do not have "echo" commands.

1 comentario

Phil Kreth
Phil Kreth el 3 de En. de 2012
I just tried that one and it did not work. I have no "echo" commands in the script - I just use sprintf and/or disp for printing to the command window.
I also wanted to add that I have looked through all of the Preferences and cannot find any option that seems to sound like it is the correct option. It must be something built into the program.

Iniciar sesión para comentar.

Jan
Jan el 3 de En. de 2012

0 votos

I can confirm, that the RUN command from the editor's toolbar display the name of the script in 2011b, but not in 2009a. I personally prefer to see, what command caused the results. But I understand, that it can decrease the readability in your case.

4 comentarios

Phil Kreth
Phil Kreth el 3 de En. de 2012
We upgraded from R2010b to R2011b and it does NOT have this behavior in R2010b. I would like an option to turn it on or off. In my case, I would have it off - but in your case, you would like it on.
Nicholas
Nicholas el 3 de En. de 2012
so is it a bug in matlab 2011b? Is a there a way to avoid it?
Phil Kreth
Phil Kreth el 3 de En. de 2012
Don't think its a bug, but there is no way to avoid it as far as I can tell - otherwise I would have figured it out. I can't find any information on it in the changelogs listed on this site, so I can't confirm that its not a bug.
Jan
Jan el 5 de En. de 2012
I've tried to find the function responsible for the output by INMEM and PROFILE with a deep detail level - without success. It is neither printed by DISP nor by FPRINTF. It does not help to add a semicolon behind the script name in the parameters of the "Run" button.
I think, this is a feature, not a bug.

Iniciar sesión para comentar.

Categorías

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by