필터 지우기
필터 지우기

How to merge two sets of data?

조회 수: 85 (최근 30일)
EMIRA SYAMIMI AHMAD SUBRI
EMIRA SYAMIMI AHMAD SUBRI 2017년 5월 19일
편집: Stephen23 2017년 5월 22일
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.

답변 (2개)

MathReallyWorks
MathReallyWorks 2017년 5월 22일
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 2017년 5월 22일
편집: Stephen23 2017년 5월 22일
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:

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by