Solving 3 unknowns from 50 Nonlinear equation

조회 수: 10 (최근 30일)
Avik Mahata
Avik Mahata 2018년 11월 4일
편집: Matt J 2018년 11월 4일
I have a set of three unknowns which I need to resolve from 50 different non linear equation. Which method should I use in matlab? I found out that fsolve can do that, but then I faced another issue. A part of the equation is constant number and a part of the equation is a 1x50 matrix. How should I feed it to the equation.
The equation is, eqn = Tn - (Tind/2)*(1+ erf(Z*sqrt(3.14)*(N-Nc))); Here, N is matrix and I have to solve for Tn, Nc and Z. I have a constant values for Tind.
Thanks

채택된 답변

Matt J
Matt J 2018년 11월 4일
편집: Matt J 2018년 11월 4일
Just combine all the unknown variables into a single vector p,
fun = @(p) p(1) - (Tind/2)*(1+ erf(p(2)*sqrt(3.14)*(N-p(3:end) ))) ;
p0=[Tn0,Z0,Nc0]; %initial guess
p=fsolve(fun,p0)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by