how to make a matrix

hallo,
i have a vector V = (a1, a2, ....., a5000) and i want to make a matix (2*2*5000) with the values [(a1 a1
a1 a1); ....... ;(a5000 a5000 a5000 a5000)]?
thanks

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 10 月 14 日

0 投票

repmat(reshape(V, 1, 1, []), 2, 2, 1)

カテゴリ

ヘルプ センター および File ExchangeOperating on Diagonal Matrices についてさらに検索

質問済み:

2020 年 10 月 14 日

回答済み:

2020 年 10 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by