How can I create a matrix composed of some data in another matrix?

2 ビュー (過去 30 日間)
JR
JR 2020 年 9 月 2 日
コメント済み: JR 2020 年 9 月 2 日
Hello,
I am new in Matlab and I would like to know if it is possible to create a matrix composed of some data in another matrix?
I would like to collect in this new matrix data with a first data being in the cell located on line 5 then the following data is 4 lines below the first data (n + 4) and the third data is also 4 lines below the second data etc.
[1] 12yab1
[2] 23yab4
[3] 21yab2
[4] 16yab3
[5] 8yab6
[6] 13yab5
[7] 36yab8
[8] 9yab19
[9] 30yab23
[10] 48yab35
...
[x] 7yab44
is there a fonction to get this kind of thing?
Thank you in advance for your help.
  4 件のコメント
KSSV
KSSV 2020 年 9 月 2 日
your data has only numbers or got strings/ chars as well?
JR
JR 2020 年 9 月 2 日
numbers, letters and chars like ° or |

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

採用された回答

dpb
dpb 2020 年 9 月 2 日
"...in this new matrix data with a first data being in the cell located on line 5 then the following data is 4 lines below the first data..."
B=A(5:4:end);
Read the "Getting Started" documentation and examples on addressing modes -- the time spent will be more than amply paid back in getting started (so to speak :) ) more quickly.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimultaneous and Synchronized Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by