function [th,r,z] = cart2pol(x,y,z)
%MATLAB Code Generation Library Function

%   Copyright 2002-2021 The MathWorks, Inc.
%#codegen

eml_invariant(nargin > 1, ...
    'MATLAB:minrhs');
% This pragma makes calls in cart2pol inherit any implicit expansion
% behavior requested at a call to cart2pol.
coder.internal.implicitExpansionBuiltin;
th = atan2(y,x);
r = hypot(x,y);
