a=1:100; b=a([1 1 1 1....(100times)], [1:end]);
% create an all zeros 100x100 matrix m=100; n=100; matrix = zeros(m, n); % create a column vector of 1x100 v = 1:n; v % create a 100x100 matrix for r=1:m matrix(r, :) = v; end matrix
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)