1. Custom Functions
Create a new M file in the M file inside the first line input function [X,Y]=PLL (X1,Y1,X2,Y2), here x1 x2 y1 y2 is the input value of your function, X Y is the output value, and then define the function you want to implement, such as: X = x1 + x2; y = y1 + y2; Then save this m file, note!! The name of the m file must be the name of the defined function, which is saved as pll.m otherwise it will go wrong. Then enter the PLL (1,2,3,4) in the MATLAB command window and see what you get? You can also create a separate m file, where you call the PLL () function.
2. Add a block comment
1) To select the content you want to annotate, and then select the tool menu "Text|comment", if you want to change the comment into a statement, also select the statement to be changed, and then use the mouse to select "Text|uncomment". The keyboard shortcut is "Ctrl+r". or select the content you want to annotate, right click on the mouse to select "Comment", if you want to change the comment into a statement, also select the statement to be changed, and then right-click the mouse to select "Uncomment" uncomment. Keyboard shortcut keys are "Ctrl+t".
2) method two using Matlab block annotation method
%{
You need to comment on several command lines that are not executed
%}
3) method Three adds a line in front of the comment segment:
If LOGICAL (0) adds a line after the comment segment: End is different from the first two methods, and this method actually does not execute the related statement through the logical judgment statement
Call of the 3.Matlab timer
MATLAB Basic functions: Custom function, add block comment, timer trial