How to save data value in new row ?

1 回表示 (過去 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
  1 件のコメント
Sohail Ahmed
Sohail Ahmed 2021 年 11 月 16 日
thanks......

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by