Solve three equations with three unknowns

Hey all
I am trying to solve three equations with three unknowns using the following code:
K_Cfb = 248.7562e-003;
K_Vfb = 4.9751e-003;
K_Vff = 746.2687e-003;
lign1 = 'K_Cfb = ((1/R_Vfb+1/R_Vff)^(-1))/((1/R_Vfb+1/R_Vff)^(-1)+R_Cfb)';
lign2 = 'K_Vfb = ((1/R_Cfb+1/R_Vff)^(-1))/((1/R_Cfb+1/R_Vff)^(-1)+R_Vfb)';
lign3 = 'K_Vff = ((1/R_Vfb+1/R_Cfb)^(-1))/((1/R_Vfb+1/R_Cfb)^(-1)+R_Vff)';
lign1=strrep(lign1 ,'K_Cfb',num2str(K_Cfb));
lign2=strrep(lign2 ,'K_Vfb',num2str(K_Vfb));
lign3=strrep(lign3 ,'K_Vff',num2str(K_Vff));
solverResult=solve(lign1,lign2,lign3,'R_Cfb','R_Vfb','R_Vff');
The coefficients K_Cfb, K_Vfb and K_Vff are calculated using R_Vfb = 300e3, R_Cbf = 6e3 and R_Vff = 2e3 (for verification).
Matlab returns no solution, what am I doing wrong ?
Thanks Dennis

Answers (2)

You seem to be trying to get an analytic solution to your equations. It is possible that no analytic solution exists.
Instead of trying to solve the problem analytically, I recommend you try a numeric solution. fsolve from the Optimization Toolbox is designed to solve this type of system.
Alan Weiss
MATLAB mathematical toolbox documentation

2 Comments

Hey Alan
I have all ready tried the fsolve command. However I got an empty solution.
Are you sure you called the Optimization Toolbox numeric solver? It usually doesn't return empty solutions. It doesn't take string equations as arguments, either, you would have to reformulate your problem.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

The system cannot be solved.
If you solve the first two parts for R_Vff, R_Vfb (simultaneously), and substitute those into the third part, then the equation that comes out is independent of R_Cfb. Thus the third equation involves a linear combination of the other two, leading to an underdetermined system that can only be consistent if
K_Vff = 1 - K_Cfb - K_Vfb

1 Comment

Moreover, if that condition between the K's is indeed satisfied, only the ratios between the R terms would be uniquely determined - that is, only the ratios R_Cfb/R_Vfb, R_Vfb/R_Vff, and R_Vff/R_Cfb are determined uniquely. This means there would be an infinite continuum of possible solutions in that case.
This is not a well-formulated problem and 'solve' is justified in not returning a solution.

Sign in to comment.

Tags

Asked:

on 4 Sep 2013

Community Treasure Hunt

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

Start Hunting!