Dynamic-Calibration/utils/YALMIP-master/extras/@ndsdpvar/repmat.m

15 lines
316 B
Mathematica
Raw Normal View History

2019-12-18 11:25:45 +00:00
function Y=repmat(varargin)
%REPMAT (overloaded)
Y = varargin{1};
dim = Y.dim;
resize = [varargin{2:end}];
index = (1:size(Y.basis,1))';
index = reshape(index,Y.dim);
index = repmat(index,resize);
Y.basis = Y.basis(index(:),:);
Y.dim = size(index);
Y = flush(Y);
% Reset info about conic terms
Y.conicinfo = [0 0];