matlab repmat(,matlab中 repmat([1:N]',[1,2]),p)什么意思?
滿意答案
guser旗艦店
2013.12.31
采納率:43%????等級(jí):13
已幫助:12468人
repmat是將矩陣按要求擴(kuò)增。 repmat([1:N]',[1,2])):就是將[1:N]'看成一個(gè)整體,就相當(dāng)于一個(gè)元素,將這個(gè)大的“元素”擴(kuò)增為1x2的矩陣,如果p是整數(shù),則就是將1x2矩陣p倍輸出,即三維擴(kuò)增。以下是Matlab的help結(jié)果: REPMAT Replicate and tile an array. B = repmat(A,M,N) creates a large matrix B consisting of an M-by-N tiling of copies of A. The size of B is [size(A,1)*M, size(A,2)*N]. The statement repmat(A,N) creates an N-by-N tiling. B = REPMAT(A,[M N]) accomplishes the same result as repmat(A,M,N). B = REPMAT(A,[M N P ...]) tiles the array A to produce a multidimensional array B composed of copies of A. The size of B is [size(A,1)*M, size(A,2)*N, size(A,3)*P, ...]. REPMAT(A,M,N) when A is a scalar is commonly used to produce an M-by-N matrix filled with A's value and having A's CLASS. For certain values, you may achieve the same results using other functions. Namely, REPMAT(NAN,M,N) is the same as NAN(M,N) REPMAT(SINGLE(INF),M,N) is the same as INF(M,N,'single') REPMAT(INT8(0),M,N) is the same as ZEROS(M,N,'int8') REPMAT(UINT32(1),M,N) is the same as ONES(M,N,'uint32') REPMAT(EPS,M,N) is the same as EPS(ONES(M,N))
10分享舉報(bào)
總結(jié)
以上是生活随笔為你收集整理的matlab repmat(,matlab中 repmat([1:N]',[1,2]),p)什么意思?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 随想录:开发一流Android SDK
- 下一篇: 实时调试WebDriver代码