% create a script called endlesson3.m Syntax: edit endlesson3 % run the script endlesson3.m Syntax: cd /Volumes/DATA/VIP_1 % path for endlesson3.m endlesson3
Define a function: % in_arg stands for input arguments, while out_arg stands for output arguments. Syntax: function =function_name(in_arg1,in_arg2,...) description end Define a subfunction (also: local function) into the function (also: main function): % Only ...
a= ; b= ; plot(a,b); % put figures in dock by clicking the tiny arrow on the upper right: % set line style, marker symbol and color. Syntax: plot(x,y,LineSpec) % LineSpec is short for Line Specifier. It is a string! plot(x1, ...
clear - remove items from workspace, freeing up system memory % clear a single variable/function a Syntax: clear a % clear a list of variables/functions Syntax: clear a b c d e % clear everything Syntax: clear 或者 clear all clc - CLear Command window, i.e. ...