필터 지우기
필터 지우기

Solving equations involving log

조회 수: 1 (최근 30일)
Masood Abbasi
Masood Abbasi 2018년 11월 17일
답변: Star Strider 2018년 11월 17일
Hi, All
How can i solve for 'x' in following equation given values of 'N' , 'U' and 'r' using Matlab.
matlab_eqn.png

답변 (3개)

Rick Rosson
Rick Rosson 2018년 11월 17일
편집: Rick Rosson 2018년 11월 17일
x = log ( 1 + U * (r^N - 1) ) / log(r);
  댓글 수: 1
Masood Abbasi
Masood Abbasi 2018년 11월 17일
Thanks Rick
I know that its the equation we get, but how can i formulate my equation in Matlab equation solver to get solution (x) without writing all equation myself

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


madhan ravi
madhan ravi 2018년 11월 17일
편집: madhan ravi 2018년 11월 17일
syms x r N U
eqn=(r^x-1)/(r^N-1)==U;
x=solve(eqn,x);
pretty(x) %to display in a neat manner

Star Strider
Star Strider 2018년 11월 17일
Using built-in MATLAB functions (no Toolboxes required):
U = 4.2;
N = 1.1;
r = 3.1;
fcn = @(x) ((r.^x - 1)./(r.^N -1)) - U;
x_soln = fzero(fcn, 1)
and more robustly, using the Optimization Toolbox:
x_soln = fsolve(fcn, 1)
Experiment to get the result you want.

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by