how to do matrix symbolic differentiation

2 visualizaciones (últimos 30 días)
Aamna Alshehhi
Aamna Alshehhi el 3 de Nov. de 2019
Comentada: Harsha Priya Daggubati el 6 de Nov. de 2019
so I wrote this to calucalte Om2 and OmA, using symbolic differentiation but I get an error saying
"Warning: Unable to find explicit solution.
> In solve (line 317)
In Gr_51_Aamna (line 72)
Error using solve>getEqns (line 404)
Input argument contains an empty equation or variable."
note that i already got Th2_2 and ThA_2 in separate matrices
Thanx in advance for any help..
% Parameters:
L1=1.8;
L3=2.4;
L2=2.2;
L4=2.7;
L1_2=1.18;
L2_2=0.467;
Th1= 134;
Th1_2=142.5;
v=0.0362;
for t=0:10
LA(:,t+1) = 1.15-(v*t);
end
%Parameters
syms L1 L2 L3 L4 L1_2 L2_2 Th1 Th1_2 integer
% variables and their derivatives
syms LA Th2_2 Om2 Al2 Th3_1 Om3 Al3 Th4_1 Om4 Al4 ThA_2 OmA AlA integer
%loop eqn.
L_eqn1 = L2_2*exp(1i*Th2_2)+LA*exp(1i*ThA_2) -L1_2*exp(1i*Th1_2)==0;
L_eqn2 = L2*exp(1i*Th2_2)-L3*exp(1i*Th3_1)+L4*exp(1i*Th4_1) -L1*exp(1i*Th1)==0;
%velocity eqn for Om2 and OmA.
dL_eqn1 = diff(L_eqn1,Th2_2)*Om2 +diff(L_eqn1,ThA_2)*OmA+ v*t;
real_vel_eqn1 = real(dL_eqn1);
imag_vel_eqn1 = imag(dL_eqn1);
[Om2, OmA]=solve (real_vel_eqn1, imag_vel_eqn1);
  1 comentario
Harsha Priya Daggubati
Harsha Priya Daggubati el 6 de Nov. de 2019
Hi,
I doubt you are giving wrong syntax to 'solve'. solve expects it's first argument to be an equation, which in your case is real part of the equation. I guess it is causing the error to popup. Refer to the following link for help:
Hope this helps!

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by