Effacer les filtres
Effacer les filtres

Calculate derivatives of two complex functions that depend on each other

1 vue (au cours des 30 derniers jours)
AAA
AAA le 3 Juin 2013
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])

Réponse acceptée

Roger Stafford
Roger Stafford le 3 Juin 2013
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.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by