This is a static copy of a profile report

Home

printopt (Calls: 24, Time: 0.001 s)
Generated 16-Jul-2020 17:08:30 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/local/printopt.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
mlprintjob>mlprintjob.mlprintjobclass method24
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
58
if ispc
240.001 s34.4%
76
if ispc
240.000 s22.1%
52
if isempty(pcmd)
240.000 s8.9%
73
if isempty(dev)
240.000 s5.5%
82
end
240.000 s4.1%
All other lines  0.000 s25.1%
Totals  0.001 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
ispcfunction480.000 s26.6%
Self time (built-ins, overhead, etc.)  0.001 s73.4%
Totals  0.001 s100% 
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 run12
Code lines that did not run7
Coverage (did run/can run)63.16 %
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
< 0.001 
     24 
  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 

< 0.001 
     24 
  52
if isempty(pcmd) 
  53 

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

  57 
    % For Windows
< 0.001 
     24 
  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
< 0.001 
     24 
  65
    end 
  66 

  67 

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

< 0.001 
     24 
  73
if isempty(dev) 
  74 

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

Other subfunctions in this file are not included in this listing.