% Initial version: Magnus Billvik, Swedish Institute of Space Physics,Uppsala, June 2005

function drawmodellonglat(x,y,z,str,val)

[phi, theta, rho]=cart2sphere(x,y,z);
phi=phi*180/pi;
theta=theta*180/pi;

for i=1:(length(phi)-1)
    line([phi(i) phi(i+1)], [theta(i) theta(i+1)], str, val);
end

