This is a static copy of a profile report

Home

printopt (12 calls, 0.000 sec)
Generated 14-Nov-2016 07:47:03 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/local/printopt.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
mlprintjob>mlprintjob.mlprintjobsubfunction12
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
82
end
120 s0%
81
end
120 s0%
80
dev = '-dprn'; 
120 s0%
78
else
120 s0%
76
if ispc
120 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
ispcfunction240 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0 s0% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function82
Non-code lines (comments, blank lines)63
Code lines (lines that can run)19
Code lines that did run11
Code lines that did not run8
Coverage (did run/can run)57.89 %
Function listing
time 
calls 
 line
   1 
function [pcmd,dev] = printopt(varargin)
   2 
%PRINTOPT Printer defaults.
   3 
%	PRINTOPT is a MATLAB file that you or your system manager can
   4 
%	edit to indicate your default printer type and destination.
   5 
%
   6 
%	[PCMD,DEV] = PRINTOPT returns two strings, PCMD and DEV.
   7 
%	PCMD is a string containing the print command that
   8 
%	PRINT uses to spool a file to the printer. Its default is:
   9 
%
  10 
%	   Unix:      lpr -r
  11 
%	   Windows:   COPY /B LPT1:
  12 
%	   Macintosh: lpr -r (Mac OS X 10.2 and higher)
  13 
%                     Print -Mps (Mac OS X 10.1)
  14 
%
  15 
%   Note: Solaris users who do not use BSD printing, i.e. lpr,
  16 
%   need to  edit this file and uncomment the line to specify 'lp -c'.
  17 
%
  18 
%	DEV is a string containing the default device option for 
  19 
%	the PRINT command. Its default is:
  20 
%
  21 
%	   Unix:      -dps2
  22 
%	   Windows:   -dwin
  23 
%	   Macintosh: -dps2
  24 
%
  25 
%	See also PRINT.
  26 

  27 

  28 
%   Copyright 1984-2011 The MathWorks, Inc.
  29 
%   The MathWorks, Inc. grants permission for Licensee to modify
  30 
%   this file.  Licensee's use of such modified file is subject
  31 
%   to the terms and conditions of The MathWorks, Inc. Software License
  32 
%   Booklet.
  33 
%   
  34 

  35 
% Initialize options to empty matrices
     12 
  36 
pcmd = []; dev = []; 
  37 

  38 
% This file automatically defaults to the dev and pcmd shown above
  39 
% in the online help text. If you would like to set the dev or pcmd
  40 
% default to be different from those shown above, enter it after this
  41 
% paragraph.  For example, pcmd = 'lpr -s -r -Pfred' would change the 
  42 
% default for Unix systems to send output to a printer named fred.
  43 
% Note that pcmd is ignored by the Windows drivers.
  44 
% See PRINT.M for a complete list of available devices.
  45 

  46 
%---> Put your own changes to the defaults here (if needed)
  47 

  48 
% ----------- Do not modify anything below this line ---------------
  49 
% The code below this line automatically computes the defaults 
  50 
% promised in the table above unless they have been overridden.
  51 

     12 
  52 
if isempty(pcmd) 
  53 

  54 
    % For Unix and Mac OS X 10.2+
     12 
  55 
    pcmd = 'lpr -r'; 
  56 

  57 
    % For Windows
     12 
  58 
    if ispc 
  59 
        def_printer = system_dependent('getdefaultprinter');
  60 
        if ~isempty(def_printer) && ~strcmp(def_printer,'FILE:')
  61 
            pcmd = ['COPY /B %s ' def_printer];
  62 
        else
  63 
            pcmd = 'COPY /B %s LPT1:'; 
  64 
        end
  65 
    end
  66 

  67 

  68 
    % For Solaris
  69 
    %cname = computer;
  70 
    %if strcmp(cname(1:3),'SOL'), pcmd = 'lp -c'; end
     12 
  71 
end 
  72 

     12 
  73 
if isempty(dev) 
  74 

  75 
    % For Windows
     12 
  76 
    if ispc 
  77 
       dev = '-dwin'; 
     12 
  78 
    else 
  79 
    % For Unix, and Macintosh
     12 
  80 
       dev = '-dprn';  
     12 
  81 
    end 
     12 
  82 
end