porttopia.blogg.se

Scilab syntax
Scilab syntax




scilab syntax

To do this we need to use the exec() function.

scilab syntax

The next step is to load the function in the Scilab environment. This extension informs Scilab that the script file contains a function definition.

scilab syntax

X1, x2 – function arguments, input variables they need to be separated by a comma ( ,) and enclosed in round brackets ( ) the function can have none, one or multiple arguments įunction content – is the sum of all the Scilab instructions that represents the definition of the function it is also named the body of the function Įndfunction – is a required keyword which must be added to the function definition it defines the end of the function definition Īfter the function is defined, the script file is saved with the extension *.sci. MyFunction – the name of the custom function it needs to be different than the existing embedded Scilab functions and it should not have the same name as a Scilab script file (*.sce) in the same working directory Y1, y2 – return values of the function they have to be separated by a comma ( ,) and enclosed in right brackets the function can have none, one or multiple return values Function – is a required keyword which must be added to the function definition it defines the start of the function definition






Scilab syntax