The base window of MATLAB
Array
variable
current folder
command window
The percedence order of base operators
Lot of ways to get help
一、google
二、The search box of top right corner
三、help + command name
For instance : help int
log
log stands for natural log
If you want log base 10,you have to use log10(X)
Function List
Arithmetic
Trigonometry
Exponents and Logarithms
Complex Numbers
Cartesian Coordinate System Conversion
Embedding Funcitons
condensed
MATLAB doesn't need to state the variable
Just need A = 10 OR A = B
The variable must be placed on the left
Rules of variables
Upper case/Lower case repersent different variable
Can variable names can begin with a number?
No, even individual number is not allowed as variables.
Other ways of
No,not even single numbers are allowed as variables.
Numeric Variable (Data) Type
The default variable type is double.
Diagrams for other data types
Method to check data type of variables
一、Double-click the name of variable you want to query
二、Use the function of whos
using model
Note: Keywords cannot be used as variable names
- Matlab does not generate error warnings even if you use the key-word as variable.
- After that,the key-word becomes an array-like name.
- The key-word will be restored after you use the clear commad
- Tips: If just use single clear command,all variables will be cleared.
Note: Key-word doesn't allowed as name of variables.
Some key-words are listed below
Some ambiguous and illegal expression as below
Numeric Display "Format"
Some Format types as fallow
Explain:
shortE stands for short scientific notation
bank represents a dollar unit with only two decimal places
rat means to display the results in fractional form
We use format + Style command to convert different formats.
Command Line Terminal
semicolon is used at the end of a statement to suppress immediate output.
The keyboard button "up" is used to invoke the last command.
Some useful Functions