PLEASE SOLVE THE EXPRESSION

조회 수: 4 (최근 30일)
amit jain
amit jain 2011년 2월 11일
PLEASE SOLVE THE EXPRESSION
y=2^2 + log?sinx
USING MATLAB.
  댓글 수: 1
amit jain
amit jain 2011년 2월 11일
it would be y=2^2 + log pi sinx

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

답변 (1개)

Walter Roberson
Walter Roberson 2011년 2월 11일
What does your ? indicate?
If your expression is y = 2^2 + log(sin(x)) and you need to solve for x, then
y - 2^2 = log(sin(x))
exp(y - 2^2) = exp(log(sin(x))
exp(y - 2^2) = sin(x)
arcsin(exp(y - 2^2)) = x
You can do this mechanically in Matlab if you have the Symbolic toolbox.
If you need to solve it numerically for a given y, then consider solving the expression
2^2 + log(sin(x)) - y = 0
perhaps using fzero()
  댓글 수: 2
amit jain
amit jain 2011년 2월 11일
actually ques is y=2^2 + log pi sinx
Walter Roberson
Walter Roberson 2011년 2월 11일
y - 2^2 = log(pi*sin(x))
exp(y - 2^2) = exp(log(pi*sin(x))
exp(y - 2^2) = pi*sin(x)
exp(y - 2^2)/pi = sin(x)
arcsin(exp(y - 2^2)/pi) = x

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by