How to create a vector of elements with a number of row equal to a number?

1 回表示 (過去 30 日間)
Andrea Di Lelio
Andrea Di Lelio 2019 年 8 月 31 日
コメント済み: Andrea Di Lelio 2019 年 8 月 31 日
Hello everyone,
I am trying to create a vector "A" 521x1 that have the last 20 rows equal to the last row of a vector "B" 26x1 and, furthermore, the rows from 501 to 482 equal to the row 25 of the vector "B". Continuosly, the rows of "A" from 481 to 462 equal to row 24 of vector "B" and then rows of "A" from 461 to 442 equal to row 23 of vector "B" and so on until the end of the vectors. At the end, I expect to obtain a vector "C" 521x1 with equal rows every 20 rows.
Could someone help me?
Thank you in advance

採用された回答

madhan ravi
madhan ravi 2019 年 8 月 31 日
編集済み: madhan ravi 2019 年 8 月 31 日
Honestly I am not able to get you but perhaps you just want:
C = repelem(B,20)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by