Hello i have a problem, i have this variables
d = 0.8, E = 157.0627, k= 8.8160e-7, M=1500, s=0.0025, v=2, w= 20, x = 0
and i have this implicit equation
C = (M./(w.*d.*sqrt(4.*pi.*E.*t))).*exp((((x-v.*t).^2)./(-4.*E.*t))-k.*t)
I want to calculate "t" when C=0.018, i was trying with solve but i can´t Could you help me?

回答 (2 件)

Mischa Kim
Mischa Kim 2016 年 12 月 7 日

0 投票

Jonathan, use fsolve instead.

1 件のコメント

Jonathan Quiroz
Jonathan Quiroz 2016 年 12 月 7 日
Could you help me with the script?

サインインしてコメントする。

Walter Roberson
Walter Roberson 2016 年 12 月 7 日

0 投票

d = 0.8, E = 157.0627, k= 8.8160e-7, M=1500, s=0.0025, v=2, w= 20, x = 0;
syms t
C = (M./(w.*d.*sqrt(4.*pi.*E.*t))).*exp((((x-v.*t).^2)./(-4.*E.*t))-k.*t);
t_sol = solve(C == 0.018, t);
That will give you the solution (6524129310423984846758976886046457856*lambertw(0, 20285218037440766998525581099461327880859375/115890541665100062514421889459201930952704))/83088253081357381625960780183393599 . You might want to double(t_sol) if you were thinking you wanted a numeric solution.

4 件のコメント

Jonathan Quiroz
Jonathan Quiroz 2016 年 12 月 8 日
Yes, how do you convert to numeric solution please?
Walter Roberson
Walter Roberson 2016 年 12 月 8 日
You might want to
double(t_sol)
if you were thinking you wanted a numeric solution
Jonathan Quiroz
Jonathan Quiroz 2016 年 12 月 14 日
Excuse me how do you make a script with that?
Walter Roberson
Walter Roberson 2016 年 12 月 14 日
d = 0.8, E = 157.0627, k= 8.8160e-7, M=1500, s=0.0025, v=2, w= 20, x = 0;
syms t
C = (M./(w.*d.*sqrt(4.*pi.*E.*t))).*exp((((x-v.*t).^2)./(-4.*E.*t))-k.*t);
t_sol = vpa(C == 0.018, t);
t_num = double(t_sol);

サインインしてコメントする。

質問済み:

2016 年 12 月 7 日

コメント済み:

2016 年 12 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by