Filter löschen
Filter löschen

one two three four

4 Ansichten (letzte 30 Tage)
James Knight
James Knight am 7 Nov. 2019
Kommentiert: Rena Berman am 12 Dez. 2019
I have two strings stored in a variable
I want to repeat B to make it the same length as A
  3 Kommentare
Guillaume am 7 Nov. 2019
If Thorsten hadn't posted an answer, I was going to close the question as it's a duplicate of
Please don't waste people time by asking the same question twice.
Rena Berman
Rena Berman am 12 Dez. 2019
(Answers Dev) Restored edit

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Thorsten am 7 Nov. 2019
Replicate B such that is is as long or longer than A, then cut it to the length of A;
B = repmat(B, 1, ceil(numel(A)/numel(B)));
B = B(1:numel(A));

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by