Copy and paste the values in the row of matrix to another row in same matrix

조회 수: 71 (최근 30일)
Turbulence Analysis
Turbulence Analysis 2020년 11월 2일
댓글: KSSV 2020년 11월 2일
Hi,
I have 1000 x 4 matrix, here I would like to copy and assign the values of first 200 rows to 5080 to 5280 rows. May I know how to asign this..

답변 (1개)

KSSV
KSSV 2020년 11월 2일
편집: KSSV 2020년 11월 2일
Let A be your 1000*4 matrix and B be other matrix whih has four columns. Assuming that B has lot many rows.
B(5081:5280,:) = A(1:200,:) ;
  댓글 수: 3
Turbulence Analysis
Turbulence Analysis 2020년 11월 2일
Hi,
Sorrry, I figured out.. I did a small mistake.. Actually the below works
A(5080:5280,:) = A(1:201,:) ;
KSSV
KSSV 2020년 11월 2일
The above will repalce 201 rows.....use
B(5081:5280,:) = A(1:200,:) ;

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

카테고리

Help CenterFile Exchange에서 Switches and Breakers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by