|||
An array is a variable type that stores the collection of similar items which can be referenced by their positions. Arrays can have 1 dimension, 2 dimensions, 3 dimensions or even larger dimensions. The elements of an array can be arrays, making it a large dimensional array.
Matrix: 2-dimension array.
e.g. In Matlab m = [1 2 3 4; 5 6 7 8] is a 2-by-4 matrix.
Vector: 1-dimension array. A row vector has a single row and a column vector has a singal column.
e.g. In Matlab v_r = [1 2 3 4 5 6] is a row vector and v_c = [1; 2; 3; 4; 5; 6] is a column vector.
Scalar: 1 by 1 matrix. Normally we call it a number.
e.g. 2
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-10-20 09:49
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社