how pad zero in matlab after each element in a row of matrix?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Shwetha Padmanabha
il 3 Nov 2019
Risposto: Walter Roberson
il 3 Nov 2019
a=ones(1,100)
need to pad 5 zeros after each element in row i.e 1 0 0 0 0 0 10 0 0 0 0 so on please help me i am new to matlab thanks in advance
0 Commenti
Risposta accettata
KALYAN ACHARJYA
il 3 Nov 2019
Modificato: KALYAN ACHARJYA
il 3 Nov 2019
a=repmat([1 0 0 0 0 ],100)
%......................^ repeatation
Or
a=repmat([1 0 0 0 0 0],1,100);
You will get resultant array, which you are looking for , the resultabt will be 1x600, right?
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Numeric Types 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!