matlab中repmat函数的用法
来源:互联网 发布:浩方对战平台for mac 编辑:程序博客网 时间:2024/05/03 13:57
B = repmat(A,m,n)
B = repmat(A,[m n])
B = repmat(A,[m n p...])
这是一个处理大矩阵且内容有重复时使用,其功能是以A的内容堆叠在(MxN)的矩阵B中,B矩阵的大小由MxN及A矩阵的内容决定,如果A是一个3x4x5的矩阵,有B = repmat(A,2,3)则最后的矩阵是6x12x5
例如:
>>B=repmat( [1 2;3 4],2,3)
B =
1 2 1 2 1 2
3 4 3 4 3 4
1 2 1 2 1 2
3 4 3 4 3 4
其结果变为4X6。A也可以置放文字串,如:
>>C=repmat(' Long live the king!', 2,2)
C =
Long live the king! Long live the king!
Long live the king! Long live the king!
也可置放其他的:
>> D=repmat(NaN,2,5)
D =
NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN
0 0
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- matlab中repmat函数的用法
- 1044: [HAOI2008]木棍分割 二分答案+DP+前缀和优化
- git使用流程图
- 约瑟夫环的Java代码实现
- float对div宽度的影响
- Eclipse配置Tomcat服务器,通用方法
- matlab中repmat函数的用法
- BZOJ 2729: [HNOI2012]排队|排列组合
- 黑马程序员——面向对象之继承
- 【积水成渊-逐步定制自己的Emacs神器】2:基本的定制Emacs
- UVA 11178(p259)----Morley's Theorem
- 驱动数据结构
- MATLAB数据类型
- Python图像处理库PIL的ImageGrab模块介绍
- LA 3263(p260)----That Nice Euler Circuits