Limit angle in [-90, 90] degree
Show older comments
As I was using ode45 to solve ODEs, I do not know to limit the result in [-90,90] degree. Anyone may provide some help?
4 Comments
Stephen23
on 2 May 2022
In case anyone was wondering about the text: https://en.wikipedia.org/wiki/Halfwidth_and_Fullwidth_Forms_(Unicode_block)
Walter Roberson
on 2 May 2022
What should happen if the angle would go outside that range?
Star Strider
on 3 May 2022
I have no idea what the code is, however using 90 times the tanh function could be one way of limiting the angle. This has the advatage of being differentiable rather than using a stepwise limit that would not be differentiable.
DGM
on 6 Jun 2024
For sake of searchability, I fixed the title. The body text remains as a curiosity for sake of Stephen's link, which is a very appreciated little tangent.
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!