About 50 results
Open links in new tab
  1. What's the difference between a script and a function in MATLAB?

    Nov 8, 2009 · This page says, Scripts versus Functions Scripts are m-files containing MATLAB statements. MATLAB ``functions'' are another type of m-file. The biggest difference between scripts …

  2. MATLAB Code Sections - Script vs. Function - Stack Overflow

    Jul 11, 2017 · For scripts it shows the section structure, since sections are the only real way to partition a script. For functions, partitioning of the code is generally accomplished by grouping operations into …

  3. Check if file is function or script in Matlab - Stack Overflow

    Sep 4, 2020 · I'm guessing there should exist some built-in function to do it since Matlab correctly assigns different icons for functions and scripts in the navigator. I could write a function to parse the …

  4. matlab - Convert .m file into .mlx file from command window - Stack ...

    Jan 31, 2024 · You can open a string of code as a live script using the matlab.internal.liveeditor.openAsLiveCode. To convert from a .m file you can use fileread first to …

  5. MATLAB: script vs function concerning output-argument

    Nov 29, 2013 · I know there is the matlab function inputnames () but I couldn't find the equivalent for the output vars. Thanks a lot in advance! matlab function return-value workspace asked Nov 29, 2013 at …

  6. What is the difference between .m and .mat files in MATLAB

    81 Files with a .m extension contain MATLAB code, either in the form of a script or a function. Files with a .mat extension contain MATLAB formatted data, and data can be loaded from or written to these …

  7. How to run MATLAB code from within Python - Stack Overflow

    Apr 12, 2020 · I am trying to run a MATLAB code using Python (I'm using python 3.6). I don't need to pass any arguments or get any outputs. I just need a line of code on Python that will simply run the …

  8. Matlab: Running an m-file from command-line - Stack Overflow

    Here are the steps: Start the command line. Enter the folder containing the .m file with cd C:\M1\M2\M3 Run the following: C:\E1\E2\E3\matlab.exe -r mfile Windows systems will use your current folder as …

  9. What is the difference between * and .* in Matlab?

    Apr 4, 2013 · %% Difference between * and .* in MatLab % * is matrix multiplication following rules of linear algebra % See MATLAB function mtimes() for help % .* is Element-wise multiplication follow …

  10. Is there a way for a matlab function to access all variables in a script

    Sep 9, 2021 · For example, I've written a GUI that allows a MATLAB user easier access to a set of functions, but is meant to work in conjunction with the interactive MATLAB command prompt. The …