About 488,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 are stored within a …

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

    This declaration statement must be the first executable line of the function. Valid function names begin with an alphabetic character, and can contain letters, numbers, or underscores.

  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. The How and Why of Writing Functions - MathWorks

    Get an overview of the course and the course example. Create a local function from code you want to repeat. Write function files for use outside of your script. Examine base and function workspaces and …

  5. fprintf - Write data to text file - MATLAB - MathWorks

    This MATLAB function applies the formatSpec to all elements of arrays A1,...An in column order, and writes the data to a text file.

  6. write - Write data to serial port - MATLAB - MathWorks

    This MATLAB function writes the row or column vector data to the specified serial port connection device.

  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 file, …

  8. writematrix - Write a matrix to a file - MATLAB - MathWorks

    If filename is the name of an existing text file, then the writing function overwrites the file. If filename is the name of an existing spreadsheet file, then the writing function writes the data to the specified …

  9. log - Natural logarithm - MATLAB - MathWorks

    This MATLAB function returns the natural logarithm ln (x) of each element in array X.

  10. 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 in program …