
Help using fsolve (theta beta mach)
조회 수: 11 (최근 30일)
이전 댓글 표시
I need to solve for theta when M1 and beta are known, I believe this is the formula I need to translate, but I am not too proficient in matlab and unsure how to turn this into code.

How do I use f solve or another formula to solve for theta?
댓글 수: 0
답변 (2개)
Sam Chak
2023년 12월 14일
Hi @Evan Gehret
If you have all the information on the right-hand side of the equation, then I think applying the inverse tangent (also known as arctangent) can give you the solution for θ. Look up atan and atan2.

help atan
help atan2
댓글 수: 1
Dyuman Joshi
2023년 12월 14일
lazymatlab
2023년 12월 14일
You do not need fsolve. Code below would be enough.
num = M1^2 * (sin(beta))^2 - 1;
den = M1^2 * (gamma + cos(2*beta)) + 2;
theta = atan(2 * cot(beta) * num / den);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!