SOLVE querry
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
[EDIT: 20110614 09:07 - reformat - WDR]
Hi
I am trying to run the following code but its taking too long.
syms a b c
f(1)=4576632.912*(a.^1.75)+152579042.4*(a.^2)-2364.98637*((0.008-a).^1.75)-(4576632.912*(b.^1.75)+152579042.4*(b.^2));
f(2)=4576632.912*(b.^1.75)+152579042.4*(b.^2)-2364.98637*((0.008-a-b).^1.75)-(4576632.912*(c.^1.75)+152579042.4*(c.^2));
f(3)=a+b+c-0.008;
[A,B,C]=solve(f(1),f(2),f(3))
- Kindly suggest an alternative.
- Also is there a way to initialize a b c like i can give a=b=c initially.
- the eqns are f(1),f(2) and f(3). if there is another way to solve the same.
Akshayy Garg
0 Commenti
Risposte (1)
Walter Roberson
il 14 Giu 2011
Are you expecting "a", "b", and "c" to be purely positive reals? If not then what meaning do you want to give to raising those values to the floating point power 1.75 ?
If you substitute the definition for c in to f(1) and f(2) you can reduce this to two equations in two variables. If you solve the parts for a in terms of b, and subtract the two and solve for 0, you find you are working with balancing the roots of a 32 degree polynomial against the roots of a 16 degree polynomial (I think it is). I am not convinced at the moment that any real roots exist.
I do not see how you can justify having some constants to 3 decimal places, some to 5, some to 2, and some of them to only 1 decimal place. The 32 degree polynomial needed to solve the expression becomes more or less numeric trash under those conditions.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!