フィルターのクリア

For loop that takes element from certain locations in vector and creating a new one using picked out elements, please!

1 回表示 (過去 30 日間)
Hi,
I need help with this:
For loop that takes element from certain locations in vector h, and creating a new one, H using those picked out elements?
I have a vector column vector h containing 25001 elements and want to pick out element that are in position 1001, 2001, 3001, 4001 and so on. How can i do that in a for or any other tool?
Best regards,
Daniel
  1 件のコメント
Daniel
Daniel 2016 年 9 月 7 日
Instead of doing it like this:
T=[T(0001) T(1001) T(2001) T(3001) T(4001) T(5001) T(6001) T(7001) T(8001) T(9001) T(10001) T(11001) T(12001) T(13001) T(14001) T(15001) T(16001) T(17001) T(18001) T(19001) T(20001) T(21001) T(22001) T(23001) T(24001) T(25001) ];

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

回答 (1 件)

José-Luis
José-Luis 2016 年 9 月 6 日
Please read this. You don't need a loop.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by