Displaying a group of vectors on separate lines
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Aleem Andrew
le 26 Fév 2021
Réponse apportée : the cyclist
le 26 Fév 2021
I am trying to display a number of vectors in separate lines. How can you create a matrix with each its rows equal to one a group of 1*n vectors? Alternately, can you use the display function to do this? I have tried using for example the command disp([a b]) but this displays the vectors all on a single line.
a = [1 2 3]; b = [4 5 6]; c = [4 5 6];
disp([a b c])
0 commentaires
Réponse acceptée
the cyclist
le 26 Fév 2021
You can use a semicolon to concatenate vertically
[a; b; c]
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Elementary Math dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!