functions of funtions symbolic
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
How could I define a functional (a function of functions), e.g
in MATLAB Symbolic Math Toolbox. The function f is an input parameter for L.
0 Commenti
Risposte (1)
Walter Roberson
il 27 Mar 2020
You cannot do that, unfortunately.
symbolic functions at the MATLAB level are strictly created by evaluating a symbolic expression to get a result, and using symfun() to wrap the sym in an object along with a list of parameter names. At execution time, MATLAB extracts the sym, sub()'s the input value for the parameter name, and returns the result. You can never get the right level of deferment to define a useful symbolic function that operates on symbolic expressions.
You can use evalin(symengine) to define a proc at the MuPAD level, but unless you prevent the result from displaying, the MuPAD engine will reset as soon as it is to be displayed.
You can define anonymous functions that do things like
syms a b F(x)
Fint = int(F,x,a,b);
L = @(f) subs(Fint, F, f)
but L will not be a functional: it is not possible to express the deferment needed.
There just might be a way involving a using feval(symengine) to hold() an expression, but I have my doubts.
0 Commenti
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!