repmat

来源:互联网 发布:玻璃优化软件下载 编辑:程序博客网 时间:2024/05/20 14:39
 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, ...].

a =
    0.9849    0.1402
    0.1238    0.1523

>> repmat(a,[1,1,3])
ans(:,:,1) =
    0.9849    0.1402
    0.1238    0.1523
ans(:,:,2) =
    0.9849    0.1402
    0.1238    0.1523
ans(:,:,3) =
    0.9849    0.1402
    0.1238    0.1523

0 0
原创粉丝点击