필터 지우기
필터 지우기

How to save data value in new row ?

조회 수: 3 (최근 30일)
Sohail Ahmed
Sohail Ahmed 2021년 11월 16일
댓글: Sohail Ahmed 2021년 11월 16일
I want to save the following data (1*22 matrix) in (2*11 matrix) . First row should contain values from 1 to 11 (indices) and the second row should contain values from 12 to 22 (indices).......
data = [471 578 518 270 1102 471 512 630 561 293 1165 511 629 559 292 1162 511 509 627 558 292 1159]

채택된 답변

Monika Jaskolka
Monika Jaskolka 2021년 11월 16일
편집: Monika Jaskolka 2021년 11월 16일
data = [471 578 518 270 1102 471 512 630 561 293 1165 511 629 559 292 1162 511 509 627 558 292 1159];
reshape(data, [11,2])'
ans = 2×11
471 578 518 270 1102 471 512 630 561 293 1165 511 629 559 292 1162 511 509 627 558 292 1159

추가 답변 (0개)

카테고리

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