Simplify: Python VS Matlab

Oliver xu

Background

The homework of Linear System Theory is challenging. Here is Problem 1:

Consider a linear system with a state transition matrix

Compute A(t).

Since the given system is linear time variant system, by using some properties of , we can easily compute . However, the expression is so complicate that i could not simplify it by hand. I call for some tools for help. The tools are Python and Matlab.

This post compare the difference of simplify function in Python and Matlab. ## Comparision ### Python sympy.simplify.simplify.simplify(expr, ratio=1.7, measure=, rational=False, inverse=False). Link https://docs.sympy.org/latest/modules/simplify/simplify.html

This function does not work well, it did not simplify the expression, giving th following outcome.

It's rediculous!

Matlab

S = simplify(expr) performs algebraic simplification of expr. If expr is a symbolic vector or matrix, this function simplifies each element of expr. Link https://www.mathworks.com/help/symbolic/simplify.html

This function works very well and much faster than Sympy.

  • 标题: Simplify: Python VS Matlab
  • 作者: Oliver xu
  • 创建于 : 2019-10-20 22:42:35
  • 更新于 : 2024-11-20 21:07:04
  • 链接: https://blog.oliverxu.cn/2019/10/20/Simplify-Python-VS-Matlab/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论
目录
Simplify: Python VS Matlab