フィルターのクリア

How to values for a matirx

1 回表示 (過去 30 日間)
Iftekharuddin Syed
Iftekharuddin Syed 2020 年 11 月 8 日
コメント済み: Iftekharuddin Syed 2020 年 11 月 10 日
There is matix A of size 12x1000, How to get elements at the 100's poistions like at 100, 200, 300, ....,1000. And assign it to another matrix/list
Each entry at the 100's position must contains all 12 rows from the original matrix.
I tried something like this
for temp = 0:1000
selected_matrix = a(:,temp+10)
end.
Can anyone suggest me how to do this.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 11 月 8 日
編集済み: Ameer Hamza 2020 年 11 月 8 日
Try this
a; % 12x1000 matrix
selected_matrix = a(:, 100:100:1000)
  2 件のコメント
Iftekharuddin Syed
Iftekharuddin Syed 2020 年 11 月 8 日
Thank you
Iftekharuddin Syed
Iftekharuddin Syed 2020 年 11 月 10 日
How can I select 5 random value out 1000( from a matrix of size 12x1000), with each randomly selected value contains all the 12 rows from the original matrix. And store it into another matrix of size 12x5.
Can anyone help me with the code.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by