1. Colon ":"
The basic use is as follows:
x=1:10; vector generation [1,2,3,4,5,6,7,8,9,10]
x=j:i:k; expression vector [j,j+i,j+2i,..., K];
A (:, j); Represents the column J of Matrix A
A (i,:); indicates that row I of matrix A is taken
A (J:K); Equivalent to A (j), A (j+1),... A (k)
A (:); Turns all matrices of a into a column vector
2. Percent percent "%"
% comment in m file and command line
3. Serial number "..."
If one line of commands is long, you can use 3 or more points at the end of this line to indicate that the line is not complete and that the next line continues.
Display of data formats:
Data storage in MATLAB is stored in double-precision. However, the display format can be different. Use the Format command to adjust the formatting.
(1) Format: Default value, data display is the same as short
(2) Format short: only 5 digits are displayed. Integers are displayed in the original format of the data, and the decimal number displays only 4 bits. For example 123.45678 shows 123.4568.
(3) Format long: Long format, displaying 15 digits.
(4) Format hex:16 binary display
(5) Format Bank: currency type. Keep two digits after the decimal point
(6) Format rat: The rational number form is displayed. 0.3333 ... will show 1/3,0.5 and 1/2 will show 1/2
(7) Format Compact: compact format
MATLAB base operator and data format display