Octave inline command
Octave inline command
In this tutorial, we will learn about the Octave inline command. Using the inline command, we can define a mathematical function in Octave. Note that this function is obsolete now, we can consider using anonymous functions. We will get the following error using the function.
warning: inline is obsolete; use anonymous functions i
instead
Syntax
>> inline (STR)
>> inline (STR, ARG1, …)
Examples
Let’s define a simple function using the inline command.
f(x) = 4x^2 – 5
>> % Define a function f(x) = 4*x^2 -5
>> f = inline(‘4*x^2 – 5′,’x’)
warning: inline is obsolete; use anonymous functions i
nstead
f =
<class inline>
>> f(3)
ans = 31
>>
We will discuss anonymous functions in the upcoming Octave tutorials.
—
Octave Tutorials
Octave Tutorial on this website can be found at:
https://www.testingdocs.com/octave-tutorial/
More information on Octave can be found on the official website:
https://www.gnu.org/software/octave/index