how to solve this equation?

1 次查看(过去 30 天)
clc
clear
syms Th1 Th2 Th3 Th4 Rs Ld Lq kexi Ts
eq1 = (-Ts*Rs + 2*Lq)/(Ts*Rs + 2*Lq);
eq2 = (Ts)/(Ts*Rs + 2*Lq);
eq3 = -(Ts*Ld)/(Ts*Rs + 2*Lq);
eq4 = -(Ts*kexi)/(Ts*Rs + 2*Lq);
d = solve(eq1==Th1,eq2==Th2,eq2==Th3,eq2==Th4,Rs,Ld,Lq,kexi);
d.Rs
d.kexi
d.Ld
d.Lq
ans =
command:
Empty sym: 0-by-1
ans =
Empty sym: 0-by-1
ans =
Empty sym: 0-by-1
ans =
Empty sym: 0-by-1

采纳的回答

Swatantra Mahato
Swatantra Mahato 2021-4-7
编辑:Swatantra Mahato 2021-4-7
Hi
I am assuming you want to solve the equation
d = solve(eq1==Th1,eq2==Th2,eq2==Th3,eq2==Th4,Rs,Ld,Lq,kexi);
You can try using the "solve" function in the Symbolic Math Toolbox with the Parameter "ReturnConditions" set to true as below:
d = solve([eq1==Th1,eq2==Th2,eq2==Th3,eq2==Th4],[Rs,Ld,Lq,kexi],'ReturnConditions',true);
which gives
>> d
d =
struct with fields:
Rs: [3×1 sym]
Ld: [3×1 sym]
Lq: [3×1 sym]
kexi: [3×1 sym]
parameters: [1×4 sym]
conditions: [3×1 sym]
where the parameters used in the solutions and the conditions under which the respective solutions are valid are stored in the struct "d" under the fields "parameters" and "conditions" respectively.
I noticed that
d = solve([eq1==Th1,eq2==Th2,eq3==Th3,eq4==Th4],[Rs,Ld,Lq,kexi]);
seems to give a unique solution if that was what you wanted to actually solve.
You can refer the documentation for "solve" for more information:
Hope this helps
  1 个评论
Lu gy
Lu gy 2021-4-11
Hi
Thank you very much for providing me with the ideas to solve the problem !

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by