Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Differential calculus, Integration > feval

feval

multiple evaluation

Calling Sequence

[z]=feval(x,y,f)
[z]=feval(x,f)

Arguments

x,y

two vectors

f

a function or a character string (for Fortran or C call)

Description

Multiple evaluation of a function for one or two arguments of vector type :

z=feval(x,f)

returns the vector z defined by z(i)=f(x(i))

z=feval(x,y,f)

returns the matrix z such as z(i,j)=f(x(i),y(j))

f is an external (function or routine) accepting on one or two arguments which are supposed to be real. The result returned by f can be real or complex. In case of a Fortran call, the function f must be defined in the subroutine fevaltable.c (in directory SCI/modules/differential_equations/src/c).

Examples

deff('[z]=f(x,y)','z=x^2+y^2');
feval(1:10,1:5,f)
deff('[z]=f(x,y)','z=x+%i*y');
feval(1:10,1:5,f)
feval(1:10,1:5,'parab')   //See ffeval.f file
feval(1:10,'parab')
// For dynamic link (see example ftest in ffeval.f)
// you can use the link command (the parameters depend on the machine):
// unix('make ftest.o');link('ftest.o','ftest'); feval(1:10,1:5,'ftest')

See Also

  • evstr — evaluation of expressions
  • horner — polynomial/rational evaluation
  • execstr — execute Scilab code in strings
  • external — Scilab Object, external function or routine
  • link — dynamic linker
Report an issue
<< diff Differential calculus, Integration impl >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:36:21 CEST 2013