Effacer les filtres
Effacer les filtres

How to merge two sets of data?

85 vues (au cours des 30 derniers jours)
EMIRA SYAMIMI AHMAD SUBRI
EMIRA SYAMIMI AHMAD SUBRI le 19 Mai 2017
Modifié(e) : Stephen23 le 22 Mai 2017
Hi! anyone can help me to merge two sets of data with different rows but same columns in each data respectively. Heres the example of my data
A = [10, 1]
B = [100, 1]
C = [A, B]
Thank You.

Réponses (2)

MathReallyWorks
MathReallyWorks le 22 Mai 2017
Hello Emira,
for given data, use this code:
clc;
A = [10, 1];
B = [100, 1];
C(1,:)=A;
C(2,:)=B;
disp(C);

Stephen23
Stephen23 le 22 Mai 2017
Modifié(e) : Stephen23 le 22 Mai 2017
Simpler:
>> A = [10,1];
>> B = [100,1];
>> C = [A;B]
C =
10 1
100 1
Note that these kind of very simple operations are covered in the introductory tutorials, which are recommended for all beginners:

Catégories

En savoir plus sur Matrices and Arrays 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!

Translated by