![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1568639/image.png)
Help using fsolve (theta beta mach)
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1568634/image.png)
How do I use f solve or another formula to solve for theta?
0 Commenti
Risposte (2)
Sam Chak
il 14 Dic 2023
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1568639/image.png)
help atan
help atan2
1 Commento
Dyuman Joshi
il 14 Dic 2023
lazymatlab
il 14 Dic 2023
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 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!