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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 过了这么久,爱了那么久,没有想放手,没有想不爱了,没有想放过你,但是我真的想你除了我你会遇到更好的,你那么好真的会...
    馨陌阅读 209评论 0 0
  • 一Sunny年前问过,你觉得5年后你会是什么样子,当时下着大雪,她很忧愁的样子。我其实也想过类似的问题,不过没有答...
    喵喵苗大刚阅读 227评论 0 0
  • 32 /寻找100首歌系列 ~ 关于教师 你知道“瓦尔瓦拉-瓦西里耶芙娜”这个名字吗? 在成长的过程中,有多少部让...
    达耳闻阅读 1,084评论 0 3
  • 在北京胡同里,四合院里呆了段日子,也学会了京腔,管叫亲切老头一声老爷子。如同一家人,真真儿的温暖。 说起初识老爷子...
    思念如一柔羽毛阅读 278评论 1 3