Calling functions
There are many functions available in Engee that perform various computational tasks.
There are functions that require input data. For example, the maximum value search function - maximum().
A = [1 3 5];
maximum(A)
When multiple parameters need to be passed to the input of a function, they are separated by commas.
B = [2 4 6];
union(A,B) # The function of combining two vectors
The values returned by the function after execution can be written to a variable.
Amin = minimum(B) # The function of finding the minimum value of a vector in
If there are several output parameters, then you can specify the variables to which they will be written in parentheses separated by commas. For example, as in the case of the function findmax(). As a result, the function returns the value of the maximum element and its index.
(Amax, idx) = findmax(A) # The function of finding the index of the maximum element of the vector and its value
To display the text, you must specify it in quotation marks.
display("Hello, world!")
Conclusion
In this example, we have reviewed the main types of functions that exist in Engee. You can get more information on using the functions in the documentation at the link: https://engee.com/helpcenter/stable/getting-started-engee/function.html