Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Solve equations and get "t"
1 回表示 (過去 30 日間)
古いコメントを表示
Dear Matlab experts,
I attached my coding below. When you look at the graph, one "t" exists.
Please let me know how to get "t".
Thank you very much in advance.
Sincerely yours,
J1
t = 0:20;
z = 17267.895;
a = -14.62;
b = -6.19;
c = -9.11;
d = -6.72;
e = -9.19;
f = -12.23;
g = -7.93;
h = -17.56;
aa =34.13;
bb = 1337.71;
cc = 81.78;
dd = 60.48;
ee = 127.45;
ff = 142.39;
gg = 62.27;
hh = 309.33;
i = aa*exp(-t.*a) + bb*exp(-t.*b) + cc*exp(-t.*c) + dd*exp(-t.*d) + ee*exp(-t.*e) + ff*exp(-t.*f) + gg*exp(-t.*g) + hh*exp(-t.*h);
j = (aa*exp(-t.*a))./i;
k = (bb*exp(-t.*b))./i;
l = (cc*exp(-t.*c))./i;
m = (dd*exp(-t.*d))./i;
n = (ee*exp(-t.*e))./i;
o = (ff*exp(-t.*f))./i;
p = (gg*exp(-t.*g))./i;
q = (hh*exp(-t.*h))./i;
jj = z*j;
kk = z*k;
ll = z*l;
mm = z*m;
nn = z*n;
oo = z*o;
pp = z*p;
qq = z*q;
plot(t,jj)
solve('z*(aa*exp(-t.*a))/i == 100','t')
0 件のコメント
回答 (2 件)
Torsten
2014 年 12 月 5 日
z = 17267.895;
a = -14.62;
b = -6.19;
c = -9.11;
d = -6.72;
e = -9.19;
f = -12.23;
g = -7.93;
h = -17.56;
aa = 34.13;
bb = 1337.71;
cc = 81.78;
dd = 60.48;
ee = 127.45;
ff = 142.39;
gg = 62.27;
hh = 309.33;
funk=@(t)(z*aa*exp(-t*a)/(aa*exp(-t*a) + bb*exp(-t*b) + cc*exp(-t*c) + dd*exp(-t*d) + ee*exp(-t*e) + ff*exp(-t*f) + gg*exp(-t*g) + hh*exp(-t*h))-100);
t0=fzero(funk,[0 20]);
Best wishes
Torsten.
Star Strider
2014 年 12 月 5 日
When I run your code, I get a plot of ‘jj’ (a vector) as a function of ‘t’ (a vector). That seems to me to do what you want.
The solution of your equation for ‘t’ requires only a couple lines of relatively simple algebra to produce:
t = -log((100*i)/(z*aa))/a
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!