I have complex equation of the form x=(y/c1)+K*(y/c1)^n ??
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have complex equation of the form x=(y/c1)+K*(y/c1)^n ?? where c1, K, n are constants. The typical values are 90e9, 5e12 and 6.1245. i need to obtain y for a x and i need to obtain it for a range of values.
1 Kommentar
James Tursa
am 8 Apr. 2016
"... i need to obtain y for a x ..."
Do you mean you are trying to solve the equation for y when you are given a value of x? And you want to do this for a range of x values?
Antworten (2)
Walter Roberson
am 8 Apr. 2016
There is no analytic solution to that for n > 3. You will need to use numeric methods such as fzero()
2 Kommentare
John D'Errico
am 8 Apr. 2016
Actually, for n == 4, this would be solvable. The limit is n >= 5, or non-integer n that will be problematic.
John D'Errico
am 8 Apr. 2016
syms n y c1 K
E = x==(y/c1)+K*(y/c1)^n;
E0 = subs(E,{c1,K,n},{90e9, 5e12, 6.1245});
There will be multiple solutions. vpasolve finds them well enough, though fzero would also work.
vpasolve(E0(1))
ans =
685108721.21251019872317593852318
vpasolve(E0(2))
ans =
838327989.34904713260360139778459
vpasolve(E0(3))
ans =
- 727372205.91495288136399524186001 - 472855561.58678110600582657021201i
vpasolve(E0(4))
ans =
740586777.76325202886393577885394
...
0 Kommentare
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!