Difference between revisions of "Matlab Arrays"

From Sutherland_wiki
Jump to: navigation, search
Line 1: Line 1:
 +
[[Category:Matlab]]
 +
 
== Array Basics ==
 
== Array Basics ==
 
An array is an ''n''-dimensional collection of numbers.  [[LinearAlgebra#Basics: Matrices & Vectors|Matrices]] are 2-dimensional arrays, and [[LinearAlgebra#Basics: Matrices & Vectors|vectors]] are 1-dimensional arrays.
 
An array is an ''n''-dimensional collection of numbers.  [[LinearAlgebra#Basics: Matrices & Vectors|Matrices]] are 2-dimensional arrays, and [[LinearAlgebra#Basics: Matrices & Vectors|vectors]] are 1-dimensional arrays.

Revision as of 19:22, 2 July 2008


Array Basics

An array is an n-dimensional collection of numbers. Matrices are 2-dimensional arrays, and vectors are 1-dimensional arrays.

Creating Vectors

Manually Creating Vectors

Using the ":" operator to create arrays

Linspace and Logspace

Creating Matrices

Manually Creating Matrices

Sparse Matrices

Accessing Arrays

Indexing arrays

Slicing arrays using the ":" operator