No BSD License  

Highlights from
LINSPACEM

1.0

1.0 | 1 rating Rate this file 1 Download (last 30 days) File Size: 1.14 KB File ID: #5835

LINSPACEM

by Mukhtar Ullah

 

05 Sep 2004 (Updated 11 Feb 2005)

Compact/fast version of LINSPACEN(by Duane Hanselman).

| Watch this File

File Information
Description

LINSPACEM Linearly Spaced Array.
LINSPACEM(X1,X2,N) where X1 and X2 are scalars generates a
row vector of N equally spaced points between X1 and X2.

If X1 and X2 are row vectors of the same size, LINSPACEN(X1,X2,N)
creates a matrix having N rows where the i-th column of the result
contains N equally spaced points between X1(i) and X2(i).

If X1 and X2 are column vectors of the same size, LINSPACEN(X1,X2,N)
creates a matrix having N columns where the i-th row of the result
contains N equally spaced points between X1(i) and X2(i).
For N<2 or X1=X2 LINSPACEM returns X2.

If N is not provided, N=100 is used.

See also: LINSPACE, LOGSPACE, LOGSPACEM

This submission was inspired by the function linspacen by Duane Hanselman.

MATLAB release MATLAB 7 (R14)
Other requirements requires scalarexpand.m(by the same author) in the file exchange: http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=6114&objectType=File
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
12 Jan 2006 Duane Hanselman

"Compact/fast" claim is unwarranted. Doesn't add anything that the more general linspacen #1053 doesn't already do without the need to download a second file from File Exchange.

Please login to add a comment or rating.
Updates
21 Oct 2004

a minor bug fixed to deal with complex arrays

01 Nov 2004

simplified by using scalarexpand.m(by the same author)

02 Nov 2004

provided link for scalarexpand.m

03 Nov 2004

One check is added for 3rd argument to be scalar

11 Feb 2005

improved documentation

Tag Activity for this File
Tag Applied By Date/Time
matrices Mukhtar Ullah 22 Oct 2008 07:31:10
linspace Mukhtar Ullah 22 Oct 2008 07:31:10
vectors Mukhtar Ullah 22 Oct 2008 07:31:10
array generation Mukhtar Ullah 22 Oct 2008 07:31:10
utilities Mukhtar Ullah 22 Oct 2008 07:31:10
matrix Mukhtar Ullah 22 Oct 2008 07:31:10

Contact us at files@mathworks.com