Sort certain matrix cells in a vector

Hi there,
I would like to read out certain cells from a matrix (Start_Matrix) and write them in a vector (Goal_Matrix).
Start_Matrix=[887.2659 222.9229 78.8083;
895.9041 209.7397 83.3533;
891.8674 216.4627 80.6671;
964.2606 112.3682 112.3682;
909.2908 188.5016 91.2047;
881.3223 233.0634 74.6114;
883.7692 231.4666 73.7613]
Goal_vector=[78.8083;83.3533;112.3682;188.5016;233.0634;231.4666]
How can I address the individual cells in the matrix directly?

2 件のコメント

KSSV
KSSV 2020 年 2 月 27 日
What is the criteria to get Goal_vector?
Mepe
Mepe 2020 年 2 月 27 日
That's my goal ;-).
How can I do this?

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

回答 (1 件)

Stephen23
Stephen23 2020 年 2 月 27 日
編集済み: Stephen23 2020 年 2 月 27 日

0 投票

Linear indexing:
>> G = Start_Matrix([15;16;18;12;13;14])
G =
78.808
83.353
112.37
188.5
233.06
231.47

カテゴリ

ヘルプ センター および File ExchangeShifting and Sorting Matrices についてさらに検索

質問済み:

2020 年 2 月 27 日

編集済み:

2020 年 2 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by