I can I duplicate raws of variables?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Anna Maria
il 27 Nov 2014
Commentato: Youssef Khmou
il 28 Nov 2014
I have imported an xls file spread sheet and I need to replicate six time each raw.
Ex. a1,b1,c1,d1 a2,b2,c2,d2 .................. ..................
Into a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,c1,d1
a2,b2,c2,d2 a2,b2,c2,d2 a2,b2,c2,d2 a2,b2,c2,d2 a2,b2,c2,d2 .................. ..................
0 Commenti
Risposta accettata
Youssef Khmou
il 27 Nov 2014
try this standard method
a=[1:3];
b=[];
for n=1:6
b=[b a];
end
2 Commenti
Youssef Khmou
il 28 Nov 2014
hi Maria, you add a semicolon to the above code :
%....
b=[]
for n=1:6
b=[b;a];
end
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Type Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!