matlab中repmat函数的用法
来源:互联网 发布:修真的电脑程序员txt 编辑:程序博客网 时间:2024/05/18 04:48
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函数的用法
- hive Version information not found 错误解决办法
- adt -bundle
- 四子连棋
- Permutation Sequence
- 隐马尔可夫模型的学习
- matlab中repmat函数的用法
- 用crosstool创建交叉编译环境
- POJ1258 基础最小生成树
- QT 按钮(4种样式)
- poj2118~Firepersons
- HDU1425_sort
- Ubuntu下搭建Android开发环境
- arm-2010.09工具链的使用
- STL用法总结