Pregunta

How do I execute .m files in Octave?

¿Fue útil?

Solución

In the Octave prompt, simply type file1.

Of course, you need to make sure Octave can recognize its path.

Otros consejos

In octave prompt, type run("file1.m") or entering the filename without .m extension.

There are two ways to execute a file in Octave ::

  1. Simply type the filename without extension .

  2. Type run("filename.m") in the command line of Octave .

    Then press ctrl + c to exit the file in middle of the run .

Example ::

File name here is  'ex1' which is being executed

To run your Octave file in GNU Octave.

  1. navigate to editor tab at the bottom of command editor
  2. Press Ctrl+O or Go to file and open your file
  3. Pres F5 or Navigate to Run and Save and Run

You can see the logs in command window

Be sure to check that your file name is same as the function name.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top