1. Two commands:
clear: Clears the value of variables in memory (as you can see in workspace)
CLC: Clears the output from command window
2. Script Editor:
Matlab scripts with the extension *.m
Create, open, and edit script files in the command Window (open the Pro directory P01.M script)
3. Save variables in Workspace
1) Save All
In workspace any blank space, the right mouse button->save
2) Save the specified variable (any number of workspace)
Ctrl + mouse click/Shift + Left click, select Variable, save As
4. MATLAB Basic conventions
1) Variable naming rules
>> variable must start with a letter
>> can only consist of letters, numbers, underscores
2) Matrix Operation conventions
>> Starting coordinates ( 0,0) instead of the programming language
>>
3) String representation
>> can only be ", not" "Otherwise error (shown in red)
4) Matrix Example
>> a=[1,2,3;4,5,6];
>> A (a)
Ans = 1
4) Output suppression
>> end of expression: End with a semicolon;
5. Understanding of basic data types
>>matlab is based on matrix operations, and all basic variables can be thought of as matrices
>> a 1 x N matrix is a row vector ;
>> a matrix of M x 1 is a column vector ;
>> a matrix of 1 x 1 is called a scalar ;
Not to be continued ...
MATLAB2015 Introductory Study 01