Not enough input arguments.

3 Ansichten (letzte 30 Tage)
Sophia Nador
Sophia Nador am 11 Dez. 2020
Bearbeitet: KALYAN ACHARJYA am 11 Dez. 2020
Hi,
I'm trying to use the repmat function :
for i=1:size(test,1)
a=(test{i,2 :4} - train{: , 2:4})
b=repmat(a)
end
But I only obtain this error :
Error using repmat
Not enough input arguments.
  1 Kommentar
Matt J
Matt J am 11 Dez. 2020
You should believe what the error message is telling you.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 11 Dez. 2020
Bearbeitet: KALYAN ACHARJYA am 11 Dez. 2020
Yes, what repmat suppose to do here, repmat(A,n) returns an array containing n copies of A in the row and column dimensions. May be you missed the "n" to be define, as an example
>> a=1:3
a =
1 2 3
>> repmat(a)
Error using repmat
Not enough input arguments.
  2 Kommentare
Sophia Nador
Sophia Nador am 11 Dez. 2020
Thank you very much :)
KALYAN ACHARJYA
KALYAN ACHARJYA am 11 Dez. 2020
Bearbeitet: KALYAN ACHARJYA am 11 Dez. 2020
My pleasure :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Matt J
Matt J am 11 Dez. 2020
Bearbeitet: Matt J am 11 Dez. 2020
You should believe what the error message is telling you. In the documentation for repmat, you will find no single-argument syntax like the one you've used.
  1 Kommentar
Sophia Nador
Sophia Nador am 11 Dez. 2020
Thank you very much for your answer ! :)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by