How to add constant values above and below of each columns of a matrix?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Nisar Ahmed
il 4 Nov 2022
Commentato: John D'Errico
il 6 Nov 2022
Hello,
I have a matrix say VP of size 100 * 106 and I want to add 50 constant values above and 50 values belowhis matrix (50 values on each column above and below) . How can I do it?
0 Commenti
Risposta accettata
Kevin Holly
il 4 Nov 2022
VP = rand(100,106);
extra50 = rand(50,106);
NewVP = [extra50;VP;extra50];
size(VP)
size(NewVP)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices 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!