Define relationship between variables in an equation

4 次查看(过去 30 天)
An equation has two variables d and t.
eqn = ((t - 21/2)*(d/2 - (20898604612049288806642049279907*t)/70957580590508366543483568128000 + 471612538725450581/36028797018963968)*(d + (20898604612049288806642049279907*t)/35478790295254183271741784064000 - 471612538725450581/18014398509481984) - ((41181014215700959230589300565923*t)/53218185442881274907612676096000 - 253280971625720775/9007199254740992)*(t/2 - 21/4)*((4992772075141567*t)/9007199254740992 - 104848213577972907/18014398509481984))/((t - 21/2)*(d + (20898604612049288806642049279907*t)/35478790295254183271741784064000 - 471612538725450581/18014398509481984) + (t/2 - 21/4)*((4992772075141567*t)/9007199254740992 - 104848213577972907/18014398509481984)) + (((41181014215700959230589300565923*t)/53218185442881274907612676096000 - 253280971625720775/9007199254740992)*(t/2 - 21/4)*((4992772075141567*t)/9007199254740992 - 104848213577972907/18014398509481984) - (t - 21/2)*(d/2 - (20898604612049288806642049279907*t)/70957580590508366543483568128000 + 471612538725450581/36028797018963968)*(d + (20898604612049288806642049279907*t)/35478790295254183271741784064000 - 471612538725450581/18014398509481984) + 39208413340930135/8796093022208)/((t - 21/2)*(d + (20898604612049288806642049279907*t)/35478790295254183271741784064000 - 471612538725450581/18014398509481984) + (t/2 - 21/4)*((4992772075141567*t)/9007199254740992 - 104848213577972907/18014398509481984) - 5373422634669521/17592186044416) == 0;
and I want to find the relationship between them like d=f(t).
How to define f(t)?

采纳的回答

Star Strider
Star Strider 2021-6-19
One approach —
syms d t
eqn = ((t - 21/2)*(d/2 - (20898604612049288806642049279907*t)/70957580590508366543483568128000 + 471612538725450581/36028797018963968)*(d + (20898604612049288806642049279907*t)/35478790295254183271741784064000 - 471612538725450581/18014398509481984) - ((41181014215700959230589300565923*t)/53218185442881274907612676096000 - 253280971625720775/9007199254740992)*(t/2 - 21/4)*((4992772075141567*t)/9007199254740992 - 104848213577972907/18014398509481984))/((t - 21/2)*(d + (20898604612049288806642049279907*t)/35478790295254183271741784064000 - 471612538725450581/18014398509481984) + (t/2 - 21/4)*((4992772075141567*t)/9007199254740992 - 104848213577972907/18014398509481984)) + (((41181014215700959230589300565923*t)/53218185442881274907612676096000 - 253280971625720775/9007199254740992)*(t/2 - 21/4)*((4992772075141567*t)/9007199254740992 - 104848213577972907/18014398509481984) - (t - 21/2)*(d/2 - (20898604612049288806642049279907*t)/70957580590508366543483568128000 + 471612538725450581/36028797018963968)*(d + (20898604612049288806642049279907*t)/35478790295254183271741784064000 - 471612538725450581/18014398509481984) + 39208413340930135/8796093022208)/((t - 21/2)*(d + (20898604612049288806642049279907*t)/35478790295254183271741784064000 - 471612538725450581/18014398509481984) + (t/2 - 21/4)*((4992772075141567*t)/9007199254740992 - 104848213577972907/18014398509481984) - 5373422634669521/17592186044416) == 0;
ds = solve(eqn,d);
d(t) = vpa(ds, 5) % Define 'd(t)' As A Function Of 't'
d(t) = 
figure
fplot(d, [-10 45])
grid
xlabel('t')
ylabel('d(t)')
.

更多回答(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