Solve and save the value in a variable
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I'm very new to matlab and I have a problem I'm trying to solve. I need to get first value answer of 0.15=m(1-sqrt(m/3)) This will have two solutions and I need to save the first solution in a variable m.
This is part of a bigger program that I'm trying to write.
I need a numerical answer of about 4 digits that I can use to solve other equations. the value should be 0.2027.
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2014년 4월 1일
sol=solve('0.15==m*(1-sqrt(m/3))')
댓글 수: 2
Azzi Abdelmalek
2014년 4월 1일
To get the real part of the second solution use
double(real(sol(2)))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!