필터 지우기
필터 지우기

how to find value of variables in more than one function that equal to zero in matlab

조회 수: 2 (최근 30일)
I have 3 functions that equal to zero, there are two variables for each function. the total variable is 3.
for example the variables are a, b, and c
the functions are:
y1=a+b=0
y2=b+c=0
y3=c+a=0
I just simplify the functions, but actually it is so long.
a in y1 must be the same value with a in y3, and so on with the other variables.
How can I find a, b, c?
  댓글 수: 1
Jorg Woehl
Jorg Woehl 2021년 3월 7일
I would first try to do this on paper before putting it into code.
Are the functions linear with respect to the variables? Solve for one variable in one equation, then substitute it in the other two equations, and repeat the process with the remaining variables, or use Gaussian elimination, or write your system of equations as a matrix eigenvalue problem and use the determinant method to find solutions. MATLAB has functions to help with that, such as eig, and the Symbolic Math toolbox is handy for this kind of work.
For nonlinear equations, you can still use the first method, or - if this becomes too tricky - you may have to do it numerically using root-finding algorithms (check out roots for polynomials, or fzero and fsolve for other nonlinear functions).

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by