Calculate derivatives of two complex functions that depend on each other

1 次查看(过去 30 天)
I have two complex functions that depend on each other and I want to calculate their derivatives (like I wrote down).
The problem is, of course: "Undefined function or variable 'f4"
I can I do that?
clc; clear all;
syms x1 x2 x3 x4 h1 h2 h3 h4 h5 u1;
f2(x1, x2, x3, x4, h1, h2, h3, h4, h5, u1)=(h2*x4*(x2+x4)^2*sin(x3)+h3*sin(x3)-h2*f2*cos(x3)+u1)/(h1+h2*cos(x3));
f4(x1, x2, x3, x4, h1, h2, h3, h4, h5, u1)=(h2*x2*x4*sin(x3)+h5*sin(x1+x3)-h2*f2*cos(x3)-h4*f2)/h4;
A21=diff(f2,x1);
subs(A21,[x1,x2,x3,x4],[0 0 0 0])

采纳的回答

Roger Stafford
Roger Stafford 2013-6-3
Why don't you do a 'solve' for 'f1' and 'f2' as the unknowns in the two equations to express each in terms of your ten other variables. Then do the 'diff' operation on each expression.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by