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!