ones                 package:matlab                 R Documentation

_M_A_T_L_A_B _o_n_e_s/_z_e_r_o_s _f_u_n_c_t_i_o_n_s

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

     Create a matrix consisting of all ones or zeros.

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

     ones(...)
     zeros(...)

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

     ...: numeric dimensions for the result

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

     Returns matrix consisting only of ones (or zeros). Defaults to
     square if dimension argument resolves to a single value.

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

     P. Roebuck, roebuck@mdanderson.org

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

     'eye'

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

     ones(3)
     ones(c(3, 3))                   # same thing 
     ones(3, 3)                      # same thing
     ones(size(matrix(NA, 3, 3)))    # same thing
     zeros(3)

