meshgrid               package:matlab               R Documentation

_M_A_T_L_A_B _m_e_s_h_g_r_i_d _f_u_n_c_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Generate X and Y matrices for three-dimensional plots.

_U_s_a_g_e:

     meshgrid(x, y, z, nargout = 2)

_A_r_g_u_m_e_n_t_s:

 x, y, z: numeric vectors of values

 nargout: numeric scalar that determines number of dimensions to return

_D_e_t_a_i_l_s:

     In the first example below, the domain specified by vectors 'x'
     and 'y' are transformed into two arrays which can be used to
     evaluate functions of two variables and three-dimensional surface
     plots. The rows of the output array 'x' are copies of the vector
     'x'; columns of the output array 'y' are copies of the vector 'y'.

     The second example below is syntactic sugar for specifying
     'meshgrid(x, x)'.

     The third example below produces three-dimensional arrays used to
     evaluate functions of three variables and three-dimensional
     volumetric plots.

_V_a_l_u_e:

     Returns list containing eiher two or three matrices depending on
     the value of 'nargout'. 

 x, y, z: output matrices

_N_o_t_e:

     Limited to two- or three-dimensional Certesian space.

_A_u_t_h_o_r(_s):

     P. Roebuck, roebuck@mdanderson.org

_S_e_e _A_l_s_o:

_E_x_a_m_p_l_e_s:

     meshgrid(1:3, 10:14)            # example 1
     meshgrid(1:3)                   # example 2
     meshgrid(5:8, 10:14, 2:3, 3)    # example 3

