필터 지우기
필터 지우기

Can anbody solve this simple equation?

조회 수: 1 (최근 30일)
Haseeb Hassan
Haseeb Hassan 2018년 9월 10일
댓글: Haseeb Hassan 2018년 10월 7일
Hello everybody.I have attached the equation 1 and equation 2 in picture,How the values on right hand side are obtained, can anybody write it step by step.I will be very thankful.Please ignore the the X and 0 in Rg(0) anf Rg(X)
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 9월 10일
How can they be obtained given what inputs?

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

채택된 답변

Stephan
Stephan 2018년 9월 10일
편집: Stephan 2018년 9월 13일
Hi,
to obtain values from your function use this:
fun_rg = @(R_g0,sigma_1,sigma_2,x)exp((x.^2.*(R_g0.^2-1.0).^2.*(1.0./2.0))./(R_g0.^2.*sigma_1.^2-R_g0.^2.*sigma_2.^2)).*sqrt(R_g0.^2)
This function handle takes values for: Rg(0), σ1, σ2 and x and gives back the value for Rg(x). For example with:
Rg(0) = 1.25
σ1 = 10
σ2 = 25
x = 3
>> fun_rg(1.25,10,25,3)
ans =
1.2478
The code to get this function is:
syms sigma_b sigma_1 sigma_2 R_g(x) R_g0
a = sqrt((sigma_b^2 + sigma_2^2) / (sigma_b^2 + sigma_1^2))
b = (sigma_2^2 - sigma_1^2) * x^2
c = 2 * (sigma_b^2 + sigma_2^2) * (sigma_b^2 + sigma_1^2)
fun_sigma_b = sqrt((sigma_2^2 - R_g0^2 * sigma_1^2) / (R_g0^2 -1))
fun_Rg_x = R_g(x) == a * exp(-b/c)
fun_Rg_x = simplifyFraction(subs(fun_Rg_x,sigma_b, fun_sigma_b))
fun_rg = matlabFunction(rhs(fun_Rg_x))
where a,b,c are stepwise written parts of the equation for Rg(x), so that Rg(x) can be written in the form:
R_g(x) = a * exp(-b/c)
This step is not neede but helps seeing what happens. To see the results in a more mathematical notation have a look at the file attached.
EDIT :
To get the result from equation 2 starting from equation 1 use:
syms sigma_b sigma_1 sigma_2 R_g(x) R_g0
a = sqrt((sigma_b^2 + sigma_2^2) / (sigma_b^2 + sigma_1^2))
b = (sigma_2^2 - sigma_1^2) * x^2
c = 2 * (sigma_b^2 + sigma_2^2) * (sigma_b^2 + sigma_1^2)
fun_Rg_x = R_g(x) == a * exp(-b/c)
fun_Rg_x = subs(fun_Rg_x,x,0)
fun_Rg_x = simplify(expand(isolate(fun_Rg_x,sigma_b)))
This will give the equation as you wanted. The mathematical notation is attached as a .pdf-file.
Best regards
Stephan
  댓글 수: 3
Stephan
Stephan 2018년 9월 13일
See my edited answer and the new attachment.
Haseeb Hassan
Haseeb Hassan 2018년 10월 7일
Sir Stephan Jung...You won the show.Thumbs up for such a nice and clear answer.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by