Matlab里面的 ...和空括号[ ],单引号,是什么意思啊?
发布网友
发布时间:2023-05-17 06:44
我来回答
共1个回答
热心网友
时间:2023-09-13 01:29
[ ] Brackets are used in forming vectors and matrices.
[6.9 9.64 SQRT(-1)] is a vector with three elements
separated by blanks. [6.9, 9.64, sqrt(-1)] is the same
thing. [1+I 2-I 3] and [1 +I 2 -I 3] are not the same.
The first has three elements and the second has five.
[11 12 13; 21 22 23] is a 2-by-3 matrix. The semicolon
ends the first row.
Vectors and matrices can be concatenated with [ ] brackets.
[A B; C] is allowed if the number of rows of A equals
the number of rows of B and the number of columns of A
plus the number of columns of B equals the number of
columns of C. This rule generalizes in a hopefully
obvious way to allow fairly complicated constructions.
N-D arrays within brackets are concatenated along the
first two dimensions. The remaining dimensions must match.
A = [] stores an empty matrix in A. See CLEAR to remove
variables from the current workspace.
For the use of [ and ] on the left of the = in multiple
assignment statements, see LU, EIG, SVD and so on.
Punctuation.
' Quote. 'ANY TEXT' is a vector whose components are the
ASCII codes for the characters. A quote within the text
is indicated by two quotes. For example: 'Don''t forget.'