About 73 results
Open links in new tab
  1. Programming and Scripts - MATLAB & Simulink - MathWorks

    For example, create a script named fibseq that uses a for loop to calculate the first 100 numbers of the Fibonacci sequence. In this sequence, the first two numbers are 1, and each subsequent number is …

  2. Create Scripts - MATLAB & Simulink - MathWorks

    Highlight commands from the Command History, right-click, and select Create Script. On the Home tab, click the New Script button. Use the edit function. For example, edit new_file_name creates (if the file …

  3. How to Create a MATLAB Script | Managing Code in MATLAB - MATLAB

    Jul 9, 2020 · Understanding what a script is in MATLAB is the fundamental skill needed to understand functions, subfunctions, etc.. This video will show how and why you write script files in MATLAB.

  4. Create Live Scripts in the Live Editor - MATLAB & Simulink

    Create live scripts in the Live Editor with formatted text, images, videos, hyperlinks, and equations, and view the generated output and graphics with the code that produced it.

  5. How to Write a MATLAB Program - MATLAB - MathWorks

    Sep 11, 2017 · Write a basic MATLAB Program using Live Scripts and learn the concepts of indexing, if-else statements, and loops.

  6. Scripts - MATLAB & Simulink - MathWorks

    Scripts are the simplest type of program file. They are useful for automating a series of MATLAB ® commands, such as computations that you have to perform repeatedly from the command line or …

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

    Create a Script with Local Functions To create a script or live script with local functions, go to the Home tab and select New Script or New Live Script. Then, add code to the file. Each local function must …

  8. Format Text in the Live Editor - MATLAB & Simulink - MathWorks

    Add formatted text, hyperlinks, images, videos, and equations to live scripts and functions to create a presentable document to share with others.

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

    Another option for storing functions is to include them in a script file. For instance, create a file named mystats.m with a few commands and two functions, fact and perm.

  10. How to Create a Script Using the Live Editor in MATLAB - MathWorks

    Jul 16, 2020 · With a live script, you can view outputs and visualizations right next to the code that produced them. In this video, you’ll learn how to create and use MATLAB scripts in the Live Editor.