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.
linspace函数产生等分的向量。
y = linspace(a,b) generates a row vector y of 100 points linearly spaced between and including a and b.
Y=linspace(a,b) 产生一个行向量,其值居于a和b之间并包含a和b的100个元素。
y = linspace(a,b,n) generates a row vector y of n points linearly spaced between and including a and b.
Y=linspace(a,b,n)产生一个行向量,其值为居于a和b之间并包含a和b的n个点线性元素。