星星人——matlab数列生成方法之repmat: 同一标量的矩阵生成

本文详细介绍了MATLAB中repmat函数的使用方法,该函数能够快速创建由特定元素填充的矩阵。例如,通过repmat(NAN,M,N)可以生成M×N的全NaN矩阵;repmat(INT8(0),M,N)等同于创建一个M×N的int8类型零矩阵。此外还介绍了如何用repmat创建不同类型的特殊矩阵。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

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个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值