Error using repmat function
Ältere Kommentare anzeigen
Error using repmat
Replication factors must be a row vector of integers or integer scalars.
Can anyone tell me why i get this error when I am trying to use
x{i} = repmat(shiftdim(varargin{i}(j,:),1-i),repvec);
2 Kommentare
Walter Roberson
am 12 Mai 2016
What is in repvec ? What is class(repvec) ?
Nik Sam
am 13 Mai 2016
Bearbeitet: Walter Roberson
am 13 Mai 2016
Antworten (1)
Walter Roberson
am 13 Mai 2016
Where you have
repvec = 2*ones(n,1);
change that to
repvec = 2*ones(1,n);
2 Kommentare
Nik Sam
am 13 Mai 2016
Walter Roberson
am 25 Mai 2016
With just the change I mentioned, I get results. I have enclosed the edited file. I tested with
f = inline('x.^2 - y');
fz1 = [0 5; 1 4; 2 3; 2.5 2.5];
fz2 = [1 3; 1.5 2.5; 1.75 2.25; 2 2];
fzr = rtrm(f, fz1, fz2)
Kategorien
Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!