Azzera filtri
Azzera filtri

How do I create a vector by repeating a vector

2 visualizzazioni (ultimi 30 giorni)
Onovo
Onovo il 28 Lug 2021
Commentato: darova il 28 Lug 2021
Given a Vector A=[1; 2], I want to create a vector B, such that B=[1; 2; 1; 2] . Thanks

Risposte (1)

KSSV
KSSV il 28 Lug 2021
Modificato: KSSV il 28 Lug 2021
A = [1; 2] ;
B = repmat(A,2,1)
B = 4×1
1 2 1 2

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by