# how to write code to find y???

조회 수: 2 (최근 30일)
Maruti Patil 2015년 3월 13일
I am new user to Matlab. I want to calculate the value of y for a given value of x
if x=8
x=(y^2)+2
how to write code to find y???

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

### 답변 (1개)

y = [-1 1] .* sqrt( x - 2 );
This is maths rather than Matlab though. Once you rearrange the equation the Matlab code for it is trivial!
There are numerous ways to code it and if you don't care about the negative root then it is even more trivial.
##### 댓글 수: 2없음 표시없음 숨기기
Maruti Patil 2015년 3월 13일
I want to calculate value of y without rearranging the equation. Although I have mentioned simple equation here, I have bigger equation...
You probably need the Symbolic Math Toolbox for that then, although it isn't something I do in my work so there may be methods in base Matlab too.

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

### 카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by