help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load and read code


From: siko1056
Subject: Re: Load and read code
Date: Sun, 25 Jan 2015 23:06:50 -0800 (PST)

Fern wrote
> I want to load and read it as if I was pasting the code from notepad to
> the command line of Octave

Hi,

>From that sentence I conclude you want to run Octave code stored in a file
"Myfile.txt". This is called a script-file [1] in Octave and has not the
"*.txt" suffix, your file should be better called "Myfile.m". After that
change it is usually sufficient to change your current working directory [2]
to wherever "Myfile.m" is stored on your system. Then simply type in the
command prompt

>> Myfile

without any suffix to run your m-file script.

HTH, Kai


[1]
https://www.gnu.org/software/octave/doc/interpreter/Script-Files.html#Script-Files
[2]
https://www.gnu.org/software/octave/doc/interpreter/Current-Working-Directory.html#Current-Working-Directory



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Load-and-read-code-tp4668257p4668259.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]