PRODUCTS
Products Overview
Mathematica
Mathematica for Students
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
SUPPORT
Support Overview
Knowledge Base
Learning Center
Community & Forums
Training & Free Seminars
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Mathematics and Algorithms
>
Matrices and Linear Algebra
>
Constructing Matrices
>
Band
>
Mathematica
>
Mathematics and Algorithms
>
Graphs & Networks
>
Graph Programming
>
Matrices and Linear Algebra
>
Constructing Matrices
>
Band
>
Mathematica
>
Visualization and Graphics
>
Graphs & Networks
>
Graph Programming
>
Matrices and Linear Algebra
>
Constructing Matrices
>
Band
>
BUILT-IN MATHEMATICA SYMBOL
Structural Operations
Vectors and Matrices
Tensors
Tutorials »
|
ArrayFlatten
ArrayPad
SparseArray
Minors
DiagonalMatrix
Take
Span
Diagonal
LowerTriangularize
UpperTriangularize
Extract
See Also »
|
Constructing Matrices
New in 6.0: Core Language
New in 6.0: List Manipulation
New in 6.0: Mathematics & Algorithms
New in 6.0: Matrix & Linear Algebra Functions
More About »
Band
Band
represents the sequence of positions on the diagonal band that starts with
in a sparse array.
Band
represents the positions between
and
.
Band
represents positions starting with
and then moving with step
.
MORE INFORMATION
Band
[
pos
]->
v
represents values
v
that repeat along the diagonal band starting at
pos
.
Band
[
pos
]->{
v
1
,
v
2
,
...
}
represents a sequence of values
along the diagonal band starting at
pos
.
With an array
a
of the same rank as the whole sparse array,
Band
[
start
]->
a
by default inserts
a
at the position specified by
start
.
With arrays
of the same rank as the whole sparse array,
Band
[
pos
]->{
a
1
,
a
2
,
...
}
represents a sequence of non-overlapping subarrays.
Band
[
start
]
is effectively equivalent to
Band
.
For scalar values,
Band
is equivalent to
Band
.
Band
stops when any coordinate first exceeds its value in
end
.
Band
[
start
,
end
]->{
v
1
,
v
2
,
...
}
takes the values
to repeat cyclically until
end
is reached.
Band
[
start
,
Automatic
,
step
]->
a
continues until the edge of the array is reached.
Band
[
start
,
Automatic
,
step
]->{
v
1
,
v
2
,
...
}
continues until the
are exhausted.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
Create a band diagonal matrix:
Convert to normal lists:
Create a band diagonal matrix:
In[1]:=
Out[1]//MatrixForm=
Convert to normal lists:
In[2]:=
Out[2]=
Scope
(11)
Mix
Band
with other
SparseArray
element specifications:
Give explicit values to fill in on the band:
Repeat the values cyclically:
Start the band at any position in the matrix:
Specify any start and end locations:
Step by 2 between elements on the band:
Any step can be used:
Automatically continue the band to the edge of the array:
Specify a band that is part of a row:
Specify an anti-diagonal matrix:
Insert a submatrix beginning at position 3, 3:
Cyclically repeat the submatrix:
Alternate the submatrix with a single element:
Generalizations & Extensions
(2)
Band
works in sparse arrays of any rank:
Fill in a plane of values into a 3D sparse array:
Applications
(2)
Make a tridiagonal matrix:
Build a tridiagonal linear system:
Properties & Relations
(2)
Band
works in
SparseArray
; use
Normal
to convert to normal lists:
The simplest case of
Band
is equivalent to
DiagonalMatrix
:
SEE ALSO
ArrayFlatten
ArrayPad
SparseArray
Minors
DiagonalMatrix
Take
Span
Diagonal
LowerTriangularize
UpperTriangularize
Extract
TUTORIALS
Structural Operations
Vectors and Matrices
Tensors
MORE ABOUT
Constructing Matrices
New in 6.0: Core Language
New in 6.0: List Manipulation
New in 6.0: Mathematics & Algorithms
New in 6.0: Matrix & Linear Algebra Functions
New in 6