first of all thanks for help :-|)
how can i compression two matrixes
for example
X=[x1,x2,x3,..,xn];
Y=[y1,y2,y3,..,yn];
in one matrix by a way that each element in X array make groupe with the corresponding from the Y matrix as
xy=[(x1,y1),(x2,y2),(x3,y3),..,(xn,yn)];
and how we can sort it agine to
X=[x1,x2,x3,..,xn];
Y=[y1,y2,y3,..,yn];

답변 (1개)

Alan Stevens
Alan Stevens 2020년 11월 22일
편집: Alan Stevens 2020년 11월 22일

0 개 추천

How about
x=[x1,x2,x3,..,xn];
y=[y1,y2,y3,..,yn];
xy = [x; y];
X = xy(1,:);
Y = xy(2,:);

댓글 수: 1

ahmed noori
ahmed noori 2020년 11월 22일
편집: ahmed noori 2020년 11월 22일
very useful thak you so much but not works with two dimensional matrix

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

질문:

2020년 11월 22일

편집:

2020년 11월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by