SGI, HP and Solaris 2 users who do not use BSD printing, i.e. 'lpr', need to edit the PRINTOPT.M file (located at $MATLABROOT/toolbox/local/printopt.m) and either uncomment the lines specific to their computer type (in the 'For SGI' or 'For Solaris' sections), or specify the print command explicitly after it is initialized as an empty matrix:
pcmd = []; dev = [];
pcmd= 'lp -c'
If you are using MATLAB 5.3.0, then you will also need to replace the following code fragment starting at line 37, in $MATLABROOT/toolbox/matlab/graphics/@printjob/send.m (where $MATLABROOT is the root MATLAB directory):
if isvms
cmdOption = '/QUEUE=';
else
cmdOption = '-P';
end
with the following:
if isvms
cmdOption = '/QUEUE=';
else
if notBSD
cmdOption = '-d';
else
cmdOption = '-P';
end
end
If you are specifying a specific printername in your printopt.m file for MATLAB 5.3.0, you will need to make the following change to the @printjob/send.m file as well:
The line that reads
if strcmp( lprcmd, 'lp -c' )
Will need to read
if strcmp(lprcmd,<your print command in single quotes>)
Backup the current versions of these files before making changes to the files.
Best Answer