MATLAB: Creating certain amount of new rows from each row in a matrix

codematrixrow creating

How can I create certain amount of rows from each row? For example
A=[a b c d
Then I want to create n new rows from the first row, and m new rows from the second and third row.
e f g h
i j k l]
from [a b c d] => Let n=2 =>
New rows [x y z k
t y j m]

Best Answer

[repmat(A(1,:), n, 1);
repmat(A(2:end,:), m, 1)]