PLEASE SOLVE THE EXPRESSION

PLEASE SOLVE THE EXPRESSION
y=2^2 + log?sinx
USING MATLAB.

답변 (1개)

Walter Roberson
Walter Roberson 2011년 2월 11일

0 개 추천

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

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

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2011년 2월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by