Understanding repmat(6,,(1:n*N),1)
古いコメントを表示
If i compute
repmat((1:n*N),6,1)
with n=3 and N=3 the complier gives me a 6X9 matrix.
Why if a create a
repmat (6,(1:n*N),1)
it gives me a 9-D double?
- 9-D is nine dimensions?
- What the compiler is doing?
4 件のコメント
1. If you want to know what repmat is doing why not simply read the repmat documentation? Is it too difficult to find? (I tried [famous internet search engine] and it took 0.0001 seconds to find the repmat page)
If you had read the documentation then you would learn that the repetitions can be input as a vector, and because you specified nine elements (the tenth being one) you generate a nine dimensional array.
2. What compiler?
Rik
2017 年 5 月 30 日
Fun fact, I looked at the documentation from a few random old releases and I couldn't find how repmat parses a mix of vector and scalar inputs, but the warning suggests it simply concatenates them.
Steven Lord
2017 年 5 月 30 日
That's correct, based on the Release Notes for release R2013b, when we introduced those warnings (and errors) for certain types of repmat calls including repmat(A, b, c) where b and c are row vectors (that are not both scalar.)
Andrea Ciufo
2017 年 5 月 30 日
編集済み: Andrea Ciufo
2017 年 5 月 30 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!