linspace

Matlab Functions List


  • y = linspace(x1,x2) returns a row vector of ++100++ evenly spaced points between x1 and x2
  • y = linspace(x1,x2,n) generates n points. The spacing between the points is (x2-x1)/(n-1)
  • 与 operator : 不同的是该函数控制的是分割数, 而非分割步长
  • 且总是包含 end (这里为 x2)
  • 生成的数组长度为 n (默认为 100)