Question about derivatives and function handles.
1 次查看(过去 30 天)
显示 更早的评论
I need to create a function which does the following:
as input, I should get something of the following (functions can be other an there can be more or less then 3 fuctions)
ϕ(a,b,c) = (a*(1/x^5) + b*cos(x) + c*log(x))^2 where x is a vector containing known elements.
Next I should compute the partial derivatie of ϕ(a,b,c) to a, b and c and organise the elements where the elements still containing a are in the first column, b in the second column, ... and the ones containing no variables are in the last column. That way i can create a linear system (A*x = b) which i can solve.
The problem is that I can create the derivative of functions but don't know how to create a function with functions as input which then can be derivated and later organise my elements in a matrix.
0 个评论
回答(1 个)
Walter Roberson
2013-3-18
How are you creating the partial derivatives? Are you using the symbolic toolbox? If you are, then instead of passing in function handles, pass in symbolic expressions representing the functions.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!