matlab中的linspace怎么用,matlab-linspace/logspace

linspace

Generate linearly spaced vectors

Syntax

y = linspace(a,b)

y = linspace(a,b,n)

Description

The linspace function generates linearly spaced vectors. It is similar to the colon operator ":", but gives direct control over the number of points.

y = linspace(a,b) generates a row vector y of 100 points linearly spaced between and including a and b.

y = linspace(a,b,n) generates a row vector y of n points linearly spaced between and including a and b.

logspace

Generate logarithmically spaced vectors

Syntax

y = logspace(a,b)

y = logspace(a,b,n)

y = logspace(a,pi)

Description

The logspace function generates logarithmically spaced vectors. Especially useful for creating frequency vectors, it is a logarithmic equivalent of linspace and the ":" or colon operator.

y = logspace(a,b)

generates a row vector y of 50 logarithmically spaced points between decades 10^a and 10^b.

y = logspace(a,b,n)

generates n points between decades 10^a and 10^b.

y = logspace(a,pi)

generates the points between 10^a and pi, which is useful for digital signal processing where frequencies over this interval go around the unit circle.

Remarks

All the arguments to logspace must be scalars

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值