fp
::fixargs
Create function by fixing all but one argument
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
fp::fixargs(f
, n
, <e, …
>)
fp::fixargs(f,1,y)
returns the function .
fp::fixargs
returns an unary function, defined
by fixing all but the n
-th argument of the function f
to
the values given by e...
.
Thus, given a m-ary
function f and m -
1 values e1,
…, em - 1, fp::fixargs
returns
the function
Fix the first and third argument of f
to x1
and x3
:
fp::fixargs(f, 2, x1, x3)(y)
Create a function which increments its argument by one:
inc := fp::fixargs(_plus, 1, 1): inc(x)
Create a function which tests the identifier x
for
a type:
type_of_x := fp::fixargs(testtype, 2, x): map([DOM_INT, DOM_IDENT], type_of_x)
|
Function |
|
Positive integer defining free argument |
|
Object used as fixed argument |
Unary function.