how to add zeros to the beginning and end
15 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
how to add zeros to the beginning and end
a = [1 3 5];
%result
a = [0 0 1 3 5 0 0];
0 Commenti
Risposte (1)
James Tursa
il 3 Mar 2020
Lots of ways to do this. Depends on how many zeros you want. E.g.,
a = [0 0 a 0 0];
Or,
m = 2;
n = 2;
a = [zeros(1,m) a zeros(1,n)];
Vedere anche
Categorie
Scopri di più su Elementary Math 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!