【发布时间】:2025-12-13 18:10:01
【问题描述】:
我希望随着时间的推移执行符号整合;代码如下。
syms x1 u1 t
x1 = symfun(sym('x1(t)'), [t]);
x1dot = p1 + p4*p8 - p13*x1;
int(x1dot,t)
答案应该是:
e^(-p13*t)*x1(0)+(p1 + p4*p8)/(-p13)*[1-e^(-p13*t)]
我得到的是:
Warning: Explicit integral could not be found.
ans(t) =
int(p1 - p13*x1(t) + p4*p8*u1(t), t)
在我看来,它不承认x1dot 是x1 的派生词。我该如何解决这个问题?
【问题讨论】:
-
p1、p4、p8和p13是什么?编辑您的问题并定义这些。根据您的错误,看起来u1也是symfun。显示您的实际代码和实际的完整错误消息。此外,您的前两行代码可以简单地写成syms x1(t) u1(没有理由显式调用symfun)。
标签: matlab symbolic-math integral