About 7,150,000 results
Open links in new tab
  1. function - Declare function name, inputs, and outputs - MATLAB

    This MATLAB function declares a function named myfun that accepts inputs x1,...,xM and returns outputs y1,...,yN.

  2. Function Creation - MATLAB & Simulink - MathWorks

    Functions contain one or more sequential commands and can accept inputs and return outputs. When you have multiple lines of code, use the function keyword to define a function within a …

  3. Create Functions in Files - MATLAB & Simulink - MathWorks

    The body of a function can include valid MATLAB expressions, control flow statements, comments, blank lines, and nested functions. Any variables that you create within a function …

  4. Add Functions to Scripts - MATLAB & Simulink - MathWorks

    Each local function must begin with its own function definition statement and end with the end keyword. The functions can appear in any order and can be defined anywhere in the script.

  5. symfun - Create symbolic functions - MATLAB - MathWorks

    Create and Define Symbolic Functions Define the symbolic function f(x,y) = x + y. First, create the function by using syms. Then define the function.

  6. Anonymous Functions - MATLAB & Simulink - MathWorks

    Many MATLAB ® functions accept function handles as inputs so that you can evaluate functions over a range of values. You can create handles either for anonymous functions or for functions …

  7. Local Functions - MATLAB & Simulink - MathWorks

    Local Functions This topic explains the term local function, and shows how to create and use local functions. MATLAB ® program files can contain code for more than one function. In a function …

  8. Nested Functions - MATLAB & Simulink - MathWorks

    You must call a nested function either directly by name (without using feval), or using a function handle that you created using the @ operator (and not str2func).

  9. function - Declare function name, inputs, and outputs - MATLAB

    This MATLAB function declares a function named myfun that accepts inputs x1,...,xM and returns outputs y1,...,yN.

  10. sym - Create symbolic variables, expressions, functions, matrices

    You cannot replace elements of a numeric vector or matrix with a symbolic variable, expression, or function because these elements cannot be converted to double-precision numbers.