This is a static copy of a profile report

Home

sph2cart (15 calls, 1.552 sec)
Generated 05-Aug-2011 13:01:31 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/specfun/sph2cart.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
spaceanglefunction10
pointing_modelfunction5
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
22
x = rcoselev .* cos(az);
150.426 s27.5%
23
y = rcoselev .* sin(az);
150.404 s26.1%
21
rcoselev = r .* cos(elev);
150.372 s23.9%
20
z = r .* sin(elev);
150.339 s21.8%
All other lines  0.011 s0.7%
Totals  1.552 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function23
Non-code lines (comments, blank lines)19
Code lines (lines that can run)4
Code lines that did run4
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function [x,y,z] = sph2cart(az,elev,r)
2 %SPH2CART Transform spherical to Cartesian coordinates.
3 % [X,Y,Z] = SPH2CART(TH,PHI,R) transforms corresponding elements of
4 % data stored in spherical coordinates (azimuth TH, elevation PHI,
5 % radius R) to Cartesian coordinates X,Y,Z. The arrays TH, PHI, and
6 % R must be the same size (or any of them can be scalar). TH and
7 % PHI must be in radians.
8 %
9 % TH is the counterclockwise angle in the xy plane measured from the
10 % positive x axis. PHI is the elevation angle from the xy plane.
11 %
12 % Class support for inputs TH,PHI,R:
13 % float: double, single
14 %
15 % See also CART2SPH, CART2POL, POL2CART.
16
17 % Copyright 1984-2005 The MathWorks, Inc.
18 % $Revision: 5.12.4.2 $ $Date: 2005/05/31 16:31:22 $
19
0.34 15 20 z = r .* sin(elev);
0.37 15 21 rcoselev = r .* cos(elev);
0.43 15 22 x = rcoselev .* cos(az);
0.40 15 23 y = rcoselev .* sin(az);