Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例えば、A = [19 20 21 22 23 24 25]; B = [2 0 3 0 0 0 2];
A = [19 20 21 22 23 24 25];
B = [2 0 3 0 0 0 2];
B からの各値を X 回繰り返す新しい配列を取得するにはどうすればよいでしょうか?
たとえば、ここでの答えは次のとおり[19 19 21 21 21 25 25]です。
[19 19 21 21 21 25 25]
呼び出しとfor組み合わせたループのみが許可されていることに注意してください。repmat
for
repmat