how to create a single column matrix from two matrices in MATLAB

1 vue (au cours des 30 derniers jours)
Irfan Ullah
Irfan Ullah le 27 Mar 2021
Hi all,
I have tow matrcies A=[1,2,3,4] and B= [7,4,6]. I want to combine it in a single column matrix.
Can anyone help me in this regrad?
thanks in advance
  1 commentaire
Calequela Manuel
Calequela Manuel le 21 Juin 2022
Modifié(e) : Calequela Manuel le 21 Juin 2022
A=[1,2,3,4];
B= [7,4,6];
Resolution:
T = ([A B])'
T = ([1 2 3 4 7 4 6])'
T = 1
2
3
4
7
4
6

Connectez-vous pour commenter.

Réponses (1)

Srinidhi
Srinidhi le 27 Mar 2021
A=[1,2,3,4];
B= [7,4,6];
C = cat(2,A,B) % or cat(2,B,A)
C = C'
  4 commentaires
Irfan Ullah
Irfan Ullah le 27 Mar 2021
@Srinidhi Thank you very much. The provided code has worked.
Irfan Ullah
Irfan Ullah le 27 Mar 2021
@Walter Roberson Thanks for your comment

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by