Matrix multiplication of Function Handles

9 visualizaciones (últimos 30 días)
Pierre-Antoine
Pierre-Antoine el 29 de Mzo. de 2018
Respondida: Steven Lord el 29 de Mzo. de 2018
I need to multiple a matrix with a vector: N * p
N and p should contain functions (N(x) and p(x)).
As mentioned here one cannot create arrays of function handles but only store them in cell or structure arrays.
How can I do my multiplication if I cannot use matrices to store my functions ?

Respuestas (1)

Steven Lord
Steven Lord el 29 de Mzo. de 2018
You can't multiply function handles. You can multiply the results you receive by evaluating function handles.
If you want to perform arithmetic on expressions representing functions of x to obtain other functions of x, like multiplying exp(x) and exp(2*x) to receive exp(3*x), use Symbolic Math Toolbox.
syms x
exp(x)*exp(2*x)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by