Core Minimal Interpreter Commands & Logical conjunction, the 'and' operator. && Short circuit boolean and operator. - Subtraction operator. + Addition operator. == Equality comparison operator. addpath Updates the search path for functions by adding the given directories d, ... to the existing path R. addtoolbox Adds an existing toolbox or a custom toolbox to load the functions contained in it. all Returns a logical that indicates whether all of the corresponding elements of the input are nonzero. and Performs logical conjunction, the 'and' operation, equivalent to the & operator. ans Returns the most recently computed result that was not assigned to a variable. any Returns a logical that indicates whether any of the corresponding elements of the input are nonzero. arg Returns the argument (angle) of each element of z in radians. The arguement is defined as atan2(imag(z),real(z)). assert Sets an error if the given condition, s, is not satisfied. An optional input argument, errormessage may be used to customize the error displayed when assert fails. assignin Assigns the value val to variable name var in context con. break Ends execution of the nearest enclosing loop, even if the end condition for the loop has not been satisfied. break will not end execution of multiple, nested loops. builtin Calls the built-in function f with given inputs, if applicable. If there is a custom function that overrides f, the custom function implementation will be ignored and the built-in function will be executed. case case is used in switch statements and specifies a constant expression, expression, that the variable used in switch is compared with. The expression in each case label must be a constant and unique in the scope of the switch statement. catch catch is used in try-catch blocks and is executed when an exception or error occurs in the try block. class Retrieves the class type of the given input, x. clc Clears the OML Command window and moves the cursor to the top left position of the Command window. clear Obliterates variable(s) from memory in the current session of the application. continue Skips statements after continue and executes the next iteration of the loop. disp Prints the value of x to the application's Command window. .* Element-wise matrix multiplication operator. else else is used in if-else statements and is executed when the if condition is not satisfied. elseif Other statement in an if-else expression if no previous 'if' condition are met. end Returns the last index of the collection being indexed. eq Equality comparison, equivalent to the == operator. error Displays a custom error message and ends execution. eval Evaluates the given expression. evalin Same as eval except variable or expression is evaluated in context. Context is either 'caller' or 'base'. exist Returns an integer (R) based on whether a variable, function, directory, or file with the name s exists in the current session. exit Exits the current session. false Returns false value(s). feval Evaluates the specified function with the given input(s). flintmax Returns the largest integer that can be represented by the string x. for For loop is useful for executing many iterations of a statement. format Sets the format for displaying numbers. funccount Returns the number of registered built-in functions in the application. funclist Displays the names of the registered built-in functions in the application. function Used to define user made functions. ge Perform greater than or equal comparison, equivalent to the >= operator. genvarname Generates unique names which can be used for variables, based on the given input(s), s. getenv Gets the value of the environment variable x, defined for the current session of the application. global Declares a list of variables as global. When a variable is declared as global it may be accessed within a function without being passed as a parameter. Variables must be declared as global in both the scope they are defined and the scope they are used. > Greater than comparison operator. >= Greater than or equal to comparison operator. gt Greater than comparison, equivalent to the > operator. help Shows help for the command name or built-in function func. horzcat Returns the horizontal concatenation of x1,x2,...,xN along the 2nd dimension. if Logical decision-making if statement. Can be combined with 'and' 'or' operators to create complex logical tables. inf Returns infinite value(s). input Displays a message, prompt, and interrupts script execution till the user provides an input. isinf Tests if a value is infinite. ismatrix Tests if a value is a matrix. isnan Tests if a value is not a number. isnumeric Tests if a value is numeric. isscalar Tests if a value is a scalar. isvarname Tests if a string is a valid variable name. lasterr Get or set the last error message. lastwarn Displays or sets the last warning message. ldivide Perform element-wise matrix left division, equivalent to the .\ operator. le Less than or equal to comparison, equivalent to the <= operator.. \ Left division of scalars and/or matrices operator. .\ Element-wise left matrix division operator. < Less than comparison operator. <= Less than or equal to comparison operator. linspace Create a row vector with equally spaced elements. logspace Create a row vector with logarithmically spaced elements. lt Less than comparison, equivalent to the < operator memoryuse Returns general data about memory used. minus Perform subtraction. mislocked Returns true if the named function f is locked. mldivide Perform left division of scalars and/or matrices, equivalent to the \ operator. mlock Locks the function into memory meaning it cannot be cleared. mpower Perform a matrix power operation, equivalent to the ^ operator. ^ Matrix power operator. mrdivide Perform right division of scalars and/or matrices, equivalent to the / operator. mtimes Perform matrix multiplication on a list of arguments from left to right, equivalent to the * operator. * Multiplication operator. munlock Unlocks the named function f. If no input is given then munlock unlocks the current function. nan Abbreviation for Not A Number. If used as a built-in function returns an n x n or m x n matrix where each cell equals NaN. nargin If called within the arguments of a function allows the last part or all of the argument list to have a variable number of inputs. When called with the input func, returns the number of required inputs. narginchk Check for correct number of inputs. nargout Returns the number of outputs. nargoutchk Check for correct number of outputs. ndgrid Construct a grid of points from coordinate vectors. ne Perform inequality comparison, equivalent to the != operator. normalize Normalize vectors. not Performs logical negation, the 'not' operation. ~ Logical negation, the 'not' operator. ~= Operator for inequality comparison. or Performs logical disjunction, the 'or' operation, equivalent to the | operator. | Logical disjunction, the 'or' operator. path Sets or displays the current search path for the application. pause Interrupts execution of a script or code. plus Perform addition on a list of arguments from left to right. polyder Returns the coefficients of the derivative of the polynomial whose coefficients are given by the vector x. power Perform power operation, applied to matrices on an element-wise basis, equivalent to the .^ operator. .^ Element-wise matrix power operator. putenv Assigns the value of the environment variable x to value for the current session of the application. quit Terminates the current session of the application. : Range operator. rdivide Perform element-wise matrix right division, equivalent to the ./ operator. restoredefaultpath Resets the current search path for functions to what it was at application startup. return Returns control to the OML interpreter. ./ Element-wise right matrix division operator. / Right division of scalars and/or matrices operator. rmpath Updates the search path for functions by removing the given directories d, ... from the existing path R. run Executes the script s in the current session of the application. The script s either needs to contain the fully qualified path or must reside in the search paths for the current session of the application. setenv Assigns the value of the environment variable x to value for the current session of the application. || Short circuit boolean 'or' operator. sort Sorts elements of x into ascending order by default. subsref Extract a subset of a collection given an indexing method and range. sub on the value val. switch Just like an if-else statement but can only compare one variable. Each possibility is represented with a 'case' with the default case being 'otherwise'. times Perform multiplication on a list of arguments from left to right, applied to matrices on an element-wise basis. Equivalent to the .* operator. true Returns true value(s). try try is used in try-catch blocks and is the code that is executed first in the sequence of the try-catch block. If there is an error in the try block, control is passed to the catch block, where exceptions are handled. type Displays the type of input given. uminus Unary minus sign. uplus Unary plus sign. varargin Specify that a function can take a variable number of arguments. varargout Specifies that a function can return a variable number of outputs. vardetail Shows variable scope and internal type for each variable name recognized by the interpreter. varlist Shows a list of variable names recognized by the interpreter. version Gets the version of the application. vertcat Vertically concatenates a1 through aN along the first dimension. warning Prints the given input string, s, as a warning. which Gives a brief description on the origin of a function. while While loop that executes until the condition returns false. who Returns the names of variables defined in the current session of the application. whos Displays the names, sizes, memory used in bytes and the class or type of each variable defined in the current session of the application.