About 436,000 results
Open links in new tab
  1. function - MathWorks

    Local functions can be added anywhere in scripts and live scripts except within conditional contexts, such as if statements or for loops. Each local function must begin with its own function definition statement and end with the end keyword. For more information, see Add Functions to …

  2. Function Creation - MathWorks

    Create Functions in Files. Store multiple commands in a program file that can accept inputs and return output. Types of Functions. There are several types of functions available with MATLAB ®, including local functions, nested functions, private functions, and anonymous functions. Anonymous Functions; Local Functions

  3. How to create a function in MATLAB - GeeksforGeeks

    May 6, 2021 · Below are some examples that depict how to use functions in MATLAB: Example 1: Function with one output. The function calculates the mean of the input vector. Output : Example 2: Function with multiple outputs. The function calculates both nCr and nPr of inputs n and r. Output : Example 3: Multiple functions in a file.

  4. How to Call a Function in MATLAB: Simple Walkthrough - wikiHow

    Mar 6, 2025 · How to Call a Function in MATLAB Start your script with function followed by the name you want to assign it. After writing your function in the script editor, call it using the format yourfunction(inputvalue1, inputvalue2, inputvalueN ).

  5. How to Create a MATLAB Function - MATLAB - 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 input that transforms the input into a desired output.

  6. lets you create a function of any number of variables by giving a string containing the function followed by a series of strings denoting the order of the input variables. This method is good for relatively simple functions that will not be used that often.

  7. How to Write a Function in Matlab: A Simple Guide

    Discover how to write a function in MATLAB effortlessly. This guide unpacks the essential steps and tips for crafting your own MATLAB functions.

  8. How to Create Function in Matlab: A Quick Guide

    Discover how to create function in matlab with ease. This guide simplifies the process, providing clear steps and practical examples for all levels. To create a function in MATLAB, define it using the `function` keyword followed by the output variable, function name, and input parameters in a separate file or within a script.

  9. User-Defined Functions | Introduction To MATLAB Programming ...

    This page includes lecture notes on how to create a user-defined function in MATLAB.

  10. Chapter 8: Functions and Function Handles – A Guide to MATLAB

    How to Create a Function in MATLAB. A function can be created in a similar method to normal scripts. By having the first line of a function contain the function command, the script will be saved as a function file and not as a .m MATLAB script.

  11. Some results have been removed
Refresh