About 307,000 results
Open links in new tab
  1. 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 …

  2. 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.

  3. 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 file.

  4. at symbol - Create anonymous functions and function handles, call ...

    The at symbol (@) creates handles to anonymous and named functions, and is also used to call superclass methods from within a subclass. For instance, f = @(x,y) x+y creates an …

  5. Create Function Handle - MATLAB & Simulink - MathWorks

    Use a function handle to create an association to a named function or an anonymous function.

  6. Local Functions - MATLAB & Simulink - MathWorks

    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.

  7. Function Handles - MATLAB & Simulink - MathWorks

    A function handle is a MATLAB ® data type that represents a function. A typical use of function handles is to pass a function to another function. For example, you can use function handles …

  8. How to Create a MATLAB Function - MathWorks

    Sep 18, 2020 · Learn how to create MATLAB function and why functions same time and effort when writing code. Functions are tasks or a set of tasks that are performed on a given set of …

  9. 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.

  10. linspace - Generate linearly spaced vector - MATLAB

    This MATLAB function returns a row vector of evenly spaced points between x1 and x2.