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

답변 (2개)

Alan Weiss
Alan Weiss 2013년 9월 4일

0 개 추천

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

Dennis
Dennis 2013년 9월 4일
Hey Alan
I have all ready tried the fsolve command. However I got an empty solution.
Alan Weiss
Alan Weiss 2013년 9월 4일
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

댓글을 달려면 로그인하십시오.

Walter Roberson
Walter Roberson 2013년 9월 4일

0 개 추천

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

Roger Stafford
Roger Stafford 2013년 9월 4일
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.

댓글을 달려면 로그인하십시오.

카테고리

태그

질문:

2013년 9월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by