Task 01: matlab.m file

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_45138230/article/details/102653520

Here Insert Picture Description
Inline functions
Here Insert Picture Description

M-file function M text file
Accept input data in the function name Receiving data to the workspace or keyboard
Dedicated arithmetic operation performed in the internal memory, regardless of the workspace Data exchange in the workspace
M can not call a text file Files can call the function M

Supplementary operator precedence (highest to lowest):

  1. Parentheses ()

  2. Transposition ( '), the power (^), complex conjugate transpose ('), Matrices (^)

  3. One yuan addition (+), unary minus (-), negation (~)

  4. Multiplication (. ), Matrix multiplication ( ), in addition to the right (./), in addition to the left (. \), Matrix right division (/), matrix left division (\)

  5. Addition (+), subtraction (-), logical NOT (~)

  6. Colon operator (:)

  7. Less than, less than or equal, greater than, greater than or equal, equal to, not equal to

  8. Wise logical operation AND (&)

  9. By logical operations or (|)

  10. "Avoid wound" AND (&&)

  11. "Avoid wound" AND (||)

Here Insert Picture Description
Here Insert Picture Description
The operator precedence, found in the book error occurred, should be A = (s * (s - a) * (s - b) * (s - c)) ^ (1/2);

Guess you like

Origin blog.csdn.net/weixin_45138230/article/details/102653520
Recommended