how to use the 'solve' function?
10 ビュー (過去 30 日間)
古いコメントを表示
hello, im having problem trying to use the solve problem. it's not my first time using it but thata the first time its not working. i have this code line:
tmp = solve('x/L = (1-(h+eta)/ho) - A*log(((h+eta)/ho - A)/(1-A))','eta');
all the parameters are known except 'eta', still it does not provide a solution.
how can i fix it? any sugestions? thank you
0 件のコメント
回答 (6 件)
Carlos
2013 年 3 月 27 日
Using arbitrary values for x, h, h0, A and L
>> syms eta;
>> x=1;h=1;ho=1;A=0.1;L=1;
>> f=x/L -(1-(h+eta)/ho) - A*log(((h+eta)/ho - A)/(1-A));
>> eval(solve(f,eta))
ans =
-1.1068 - 0.2302i
1 件のコメント
Jaimie Ritchie
2023 年 11 月 22 日
This was incredibly helpful to me in learning to use the solve function. I was able to plug in my equation and get a result. Thank you!
Carlos
2013 年 3 月 27 日
Doing
>> tmp = solve('x/L = (1-(h+eta)/ho) - A*log(((h+eta)/ho - A)/(1-A))','eta')% no semicolon here
tmp =
A*ho - h + (ho - A*ho)/(exp(wrightOmega(log((ho - A*ho)/(A*ho)) - (x/L + h/ho - (h - A*ho)/ho - 1)/A))*exp((x/L + h/ho - (h - A*ho)/ho - 1)/A))
It does give a solution.
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!