AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Plug in values symbolic math toolbox9/20/2023 ![]() ![]() Symbolsīefore doing anything with SymPy, you need to declare the symbols you will use in your expressions. If you ask SymPy, sympy.sqrt(8) gives 2*sqrt(2), which is mathematically exact. The main point of SymPy is that it understands maths.įor example, with the standard Python library, computing math.sqrt(8) will gives us 2.82842712475.įor engineers, this is not really false, but for mathematicians, it is not really true either. This article will serve as a small demonstration of its capabilities, and to do so, we will jump a few centuries before rocketry was invented: let’s attack a castle! SymPy basics Usually, a programming language can not manipulate variables without predefined values, but I found a Python library which can: SymPy. One of them involves testing several control laws (of the acceleration), which implies quite a lot of manual calculations (to integrate to obtain the velocity and position).ĭoing these calculations by hand is tedious and error prone, and I thought about using a symbolic math program. While working on my Moon lander guidance software, I am making several small prototypes to test ideas. Symbolic maths in Python: Attacking a castle with SymPy ![]()
0 Comments
Read More
Leave a Reply. |