repmat                package:matlab                R Documentation

_M_A_T_L_A_B _r_e_p_m_a_t _f_u_n_c_t_i_o_n

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

     Replicate and tile a matrix.

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

     repmat(A, ...)

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

       A: vector or matrix to be tiled. Must be numeric, logical,
          complex or character.

     ...: numeric dimensions for the result

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

     Returns matrix with value 'A' tiled to the number of dimensions
     specified. 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:

     'ones', 'zeros'

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

     repmat(1, 3)                       # same as ones(3)
     repmat(1, c(3, 3))                 # same thing 
     repmat(1, 3, 3)                    # same thing
     repmat(1, size(matrix(NA, 3, 3)))  # same thing
     repmat(matrix(1:4, 2, 2), 3)

