MATLAB: Does printing from the Command Window fail in MATLAB 7.0 (R14) and 7.0.1 (R14SP1)

7.07.0.1commandfreezehangsMATLABprintr14r14sp1window

When I try to print from the Command Window in MATLAB 7.0 (R14) and 7.0.1 (R14SP1) on Windows XP, MATLAB hangs and does not print.
When I select "File -> Print…" from the Desktop menu bar, MATLAB takes all the system resources and does not print.
I try to print to a file and encounter the same problem. However, I can successfully print from the Figure Window, Editor Window and Command History Window. I can also print successfully if I select parts or all of the Command Window text, and then choose "File -> Print Selection…".

Best Answer

This bug has been fixed in MATLAB 7.0.4 (R14SP2). For previous releases, read below for any possible workarounds:
There is a bug in MATLAB 7.0 (R14) and 7.0.1 (R14SP1) in the way that the Command Window prints.
To work around this issue, add the CLC command to your startup.m file, by performing these steps:
1. Execute the following code at the MATLAB command prompt to determine if startup.m exists and open/ add startup.m:
if exist('startup')==2
edit startup
elseif exist('startup')==0
a = which('matlabrc');
parts = fileparts(a);
edit([parts, '\startup'])
end
2. After the last line of code, add:
clc
3. Save startup.m
4. Close and restart MATLAB
This will clear the Command Window during startup.