This is a static copy of a profile reportHome
xyzvchk (417 calls, 101.150 sec)
Generated 05-Nov-2014 07:52:39 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/polyfun/xyzvchk.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
interp3 | function | 417 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
31 | [x,y,z] = meshgrid(x,y,z); | 417 | 100.809 s | 99.7% |  |
61 | if automesh(xi,yi,zi) | 417 | 0.200 s | 0.2% |  |
30 | if isvector(x) && isve... | 417 | 0.040 s | 0.0% |  |
28 | if ~isvector(v), % v is not a ... | 417 | 0.040 s | 0.0% |  |
22 | msg = msg(zeros(0,1)); | 417 | 0.020 s | 0.0% |  |
All other lines | | | 0.040 s | 0.0% |  |
Totals | | | 101.150 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
meshgrid | function | 417 | 100.799 s | 99.7% |  |
automesh | function | 417 | 0.140 s | 0.1% |  |
xyzvchk>isvector | subfunction | 1668 | 0.020 s | 0.0% |  |
Self time (built-ins, overhead, etc.) | | | 0.190 s | 0.2% |  |
Totals | | | 101.150 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 66 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 49 |
Code lines that did run | 25 |
Code lines that did not run | 24 |
Coverage (did run/can run) | 51.02 % |
Function listing
time calls line
1 function [msg,x,y,z,v,xi,yi,zi] = xyzvchk(arg1,arg2,arg3,arg4,arg5,arg6,arg7)
2 %XYZVCHK Check arguments to 3-D volume data routines.
3 % [MSG,X,Y,Z,V,XI,YI,ZI] = XYZVCHK(X,Y,Z,V,XI,YI,ZI), checks the
4 % input arguments and returns either an error message in MSG or
5 % valid X,Y,Z,V (and XI,YI,ZI) data.
6
7 % Copyright 1984-2009 The MathWorks, Inc.
8 % $Revision: 1.14.4.4 $ $Date: 2009/03/16 22:18:25 $
9
0.01 417 10 error(nargchk(7,7,nargin,'struct'));
11
417 12 x = [];
417 13 y = [];
417 14 z = [];
417 15 v = [];
417 16 xi = [];
417 17 yi = [];
417 18 zi = [];
19
417 20 msg.message = '';
417 21 msg.identifier = '';
0.02 417 22 msg = msg(zeros(0,1));
23
417 24 if nargin>4, % xyzchk(x,y,z,v,...)
417 25 x = arg1; y = arg2; z = arg3; v = arg4;
417 26 if ndims(v)~=3, msg = makeMsg('VNot3D', 'V must be a 3-D array.'); return, end
0.01 417 27 siz = size(v);
0.04 417 28 if ~isvector(v), % v is not a vector or scalar
29 % Convert x,y,z to row, column, and page matrices if necessary.
0.04 417 30 if isvector(x) && isvector(y) && isvector(z),
100.81 417 31 [x,y,z] = meshgrid(x,y,z);
417 32 if ~isequal([size(y,1) size(x,2) size(z,3)],siz),
33 msg = makeMsg('lengthXYAndZDoNotMatchSizeV', 'The lengths of X,Y and Z must match the size of V.');
34 return
35 end
36 elseif isvector(x) || isvector(y) || isvector(z),
37 msg = makeMsg('XYAndZShapeMismatch', 'X,Y and Z must all be vectors or all be arrays.');
38 return
39 else
40 if ~isequal(size(x),size(y),size(z),siz),
41 msg = makeMsg('XYZAndVSizeMismatch', 'Matrices X,Y and Z must be the same size as V.');
42 return
43 end
44 end
45 elseif isvector(v) % v is a vector
46 if ~isvector(x) || ~isvector(y) || ~isvector(z),
47 msg = makeMsg('XYZAndVShapeMismatch', 'X,Y and Z must be vectors when V is.');
48 return
49 elseif ~isequal(length(x),length(y),length(z),length(v)),
50 msg = makeMsg('XYZAndVLengthMismatch', 'X,Y and Z must be the same length as V.');
51 return
52 end
53 end
417 54 end
55
0.01 417 56 if nargin==7, % xyzchk(x,y,z,v,xi,yi,zi)
417 57 xi = arg5; yi = arg6; zi = arg7;
58
59 % If xi,yi and zi don't all have the same orientation, then
60 % build xi,yi,zi arrays.
0.20 417 61 if automesh(xi,yi,zi)
62 [xi,yi,zi] = meshgrid(xi,yi,zi);
0.01 417 63 elseif ~isequal(size(xi),size(yi),size(zi)),
64 msg = makeMsg('XIYIAndZISizeMismatch', 'XI,YI, and ZI must be the same size or vectors of different orientations.');
65 end
417 66 end
Other subfunctions in this file are not included in this listing.