区分变量和sympy符号表达的常数
我从用户那里以符号表达为输入,然后将其wrt区分开为变量,然后制作由表达式和分化表达式组成的矩阵。然后通过CodeGen将其通过以生成AC文件。
但是我希望代码将一些特定符号视为可变,而其他符号则是常数。该怎么做?
I am taking from user a symbolic expression as input and then differentiating it wrt to variables and then making a matrix consisting of the expression and differentiated expression. Then passed this through codegen to generate a c file.
But I want the code to consider some specific symbols as variable and other as constant. How to do so?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论