About 50 results
Open links in new tab
  1. Calling Functions - MATLAB & Simulink - MathWorks

    MATLAB® provides a large number of functions that perform computational tasks. Functions are equivalent to subroutines or methods in other programming languages. To call a function, such as …

  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. 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 anonymous …

  4. Defining and calling functions in MATLAB - MathWorks

    Feb 27, 2024 · The syntax matlab uses to define a function is literally how you would use that function from another piece of code with a 'function' attached to the front to define it as a function.

  5. Calling a function in MATLAB - MATLAB Answers - MATLAB Central

    Feb 23, 2015 · This works in the command window, or within another function or script. You might like to revise the differences between scripts and functions in MATLAB, as these have very different …

  6. Using Function-Call Subsystems - MATLAB & Simulink - MathWorks

    Using Function-Call Subsystems A Function-Call Subsystem block is a conditionally executed subsystem that runs each time the control port receives a function-call event. A Stateflow ® chart, …

  7. How do I call a function within another function? - MATLAB Answers ...

    Jan 21, 2019 · Your question is asking how to CALL a function from within another function, but your sample code is trying to DEFINE a function within another function. This you can't do.

  8. 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 are stored within a …

  9. How do I call a function from the command window - MathWorks

    Feb 9, 2024 · I have this code, and it works properly, however, I need a way to be able to call it from the command window. The line myEquation (2) auto inputs the value as 2, but I need to be able to enter …

  10. Call Local Functions Using Function Handles - MATLAB & Simulink

    This example shows how to create handles to local functions. If a function returns handles to local functions, you can call the local functions outside of the main function. This approach allows you to …