Matlab symfun vs anonymous function

What is the difference between using symfun and anonymous function in Matlab? Which one is better, i.e. faster? It looks like I can use both symbolic and real numbers.

Here they discuss the difference between built-in and anonymous functions, but do not mention symfun.

+2
source share
1 answer

The main functions of MATLAB are intended for numerical calculations, that is, for working with floating point numbers. By default, MATLAB variables and functions are numeric, which is why in your related discussion, only built-in and anonymous functions are compared.

, Symbolic Math Toolbox, . , , , . , , , ( , MATLAB , ). , MATLAB, , , .

( , ) () , . matlabFunction Symbolic Math Toolbox, ( - ).

, , f=@(x) 3*x^2-2, , , f(3). , , . , , .

+4

Source: https://habr.com/ru/post/1690489/


All Articles