Efficient way to solve this (nonlinear) equation?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello all, I want to solve a nonlinear equation but don't know efficient way to do it in Matlab. Can anyone suggest a good way? Here is my code:
G12=7000;
phi=2*pi/180;
syms gamma_6
tau_6= G12*(gamma_6-20*(gamma_6)^2);
sigma_x= -tau_6/(phi+gamma_6);
sigma_1=vpa(diff(sigma_x,gamma_6));
f=matlabFunction(sigma_1);
I want to solve expression sigma_1=0; sigma_1 is function of gamma_6. What I can do is solve till
sigma_1=vpa(diff(sigma_x,gamma_6));
Then copy entire string to solve('.....=0',gamma_6) However this is not most efficient way. I tried fsolve(f,..) but problems with algorithm. Any suggestions most appreciated. Thanks!
댓글 수: 0
답변 (1개)
Walter Roberson
2014년 2월 21일
-(1/90)*pi +/- (1/180)*sqrt(4*pi^2 + 18*pi)
sigma_1 has two parts added together. When you bring them to a common denominator the expression simplifies to
((25200000 * gamma_6 - 630000)*pi + 1134000000*gamma_6^2) / (pi+90*gamma_6)^2
You want to solve for 0 so you can solve for the numerator being 0. That is a simple quadratic.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!