フィルターのクリア

How to Create/Modify for matrices or matrix

7 ビュー (過去 30 日間)
Mirza Etnisa
Mirza Etnisa 2022 年 4 月 12 日
編集済み: Les Beckham 2022 年 4 月 12 日
K=5
matA= [1 2 ..4 K]
matB=[matA matA matA matA matA]
matB=[1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5]
How to operate this equation matB?

採用された回答

Arif Hoq
Arif Hoq 2022 年 4 月 12 日
try this:
K=5
K = 5
matA=1:K;
% matB=[matA matA matA matA matA]
% matB=[1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5]
matB=repmat(matA,size(matA,1),numel(matA))
matB = 1×25
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

その他の回答 (1 件)

Les Beckham
Les Beckham 2022 年 4 月 12 日
編集済み: Les Beckham 2022 年 4 月 12 日
K=5;
matA = 1:K
matA = 1×5
1 2 3 4 5
matB = repmat(matA, 1, K)
matB = 1×25
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

カテゴリ

Help Center および File ExchangeEmbedded Coder Supported Hardware についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by