如果遇到与、或、非之类的操作字符,在matlab中不知道怎么输入,你可以:
在命令窗口中输入:
help |
即可显示matlab中操作字符如下:
Operators and special characters.
Arithmetic operators.
plus - Plus +
uplus - Unary plus +
minus - Minus -
uminus - Unary minus -
mtimes - Matrix multiply *
times - Array multiply .*
mpower - Matrix power ^
power - Array power .^
mldivide - Backslash or left matrix divide /
mrdivide - Slash or right matrix divide /
ldivide - Left array divide ./
rdivide - Right array divide ./
kron - Kronecker tensor product kron
Relational operators.
eq - Equal ==
ne - Not equal ~=
lt - Less than <
gt - Greater than >
le - Less than or equal <=
ge - Greater than or equal >=
Logical operators.
Short-circuit logical AND &&
Short-circuit logical OR ||
and - Element-wise logical AND &
or - Element-wise logical OR |
not - Logical NOT ~
xor - Logical EXCLUSIVE OR
any - True if any element of vector is nonzero
all - True if all elements of vector are nonzero
Special characters.
colon - Colon :
paren - Parentheses and subscripting ( )
paren - Brackets [ ]
paren - Braces and subscripting { }
punct - Function handle creation @
punct - Decimal point .
punct - Structure field access .
punct - Parent directory ..
punct - Continuation ...
punct - Separator ,
punct - Semicolon ;
punct - Comment %
punct - Invoke operating system command !
punct - Assignment =
punct - Quote '
transpose - Transpose .'
ctranspose - Complex conjugate transpose '
horzcat - Horizontal concatenation [,]
vertcat - Vertical concatenation [;]
subsasgn - Subscripted assignment ( ),{ },.
subsref - Subscripted reference ( ),{ },.
subsindex - Subscript index
本文介绍了在Matlab中如何使用各种操作字符,包括算术、关系和逻辑运算符,以及特殊字符如冒号、括号等。此外,还详细讲解了短路逻辑AND、OR以及元素级逻辑运算,并提供了矩阵乘法、比较和逻辑操作的示例。
3787

被折叠的 条评论
为什么被折叠?



