size                 package:matlab                 R Documentation

_M_A_T_L_A_B _s_i_z_e _f_u_n_c_t_i_o_n

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

     Provides dimensions of 'X'.

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

     size(X, dimen)

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

       X: vector, matrix, or array object

   dimen: numeric scalar specifies particular dimension

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

     This is an S4 generic function. Vector will be treated as a single
     row matrix.  Stored value is equivalent to 'dim'.

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

     Returns object of class 'size_t' containing the dimensions of
     input argument 'X' if invoked with a single argument. Returns
     integer value of specified dimension if invoked with two
     arguments. If 'dimen' specifies a higher dimension than exists,
     returns 1 representing the singleton dimension.

_N_o_t_e:

     Handling of vectors is different than in initial implementation.
     Initial implementation returned 'length'.

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

     P. Roebuck, roebuck@mdanderson.org

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

     size(2:9)                       # 1 8
     size(matrix(1:8, 2, 4))         # 2 4
     size(matrix(1:8, 2, 4), 2)      # 4
     size(matrix(1:8, 2, 4), 3)      # 1

