如何对需要先进行矩阵计算的函数进行积分?
我现在正在做论文。我坚持使用积分。我的函数定义为
myfun =(exp(t*Q)*V*x)(j);
其中 Q
和 V
是矩阵 (n*n),x
是一个元素为 1 的向量,经过计算我们得到该向量的第 j_ 个元素,然后我需要对 t 进行积分。
我想在matlab中使用quad
。然而,重点是它会报告内部矩阵的大小不同。由于这里的 A 不是数字?...
我该怎么做。否则我只能针对 t 本身编写一个循环,这非常慢。
谢谢
I am doing my dissertation now. I stuck with a integral. My function is defined as
myfun =(exp(t*Q)*V*x)(j);
where Q
and V
are a matrix (n*n), x
is a vector which elements are 1, then after calculation we get the j_th element of that vector then I need to integrate the function against t.
I want to use the quad
in the matlab. However the point is that it will report the inner matrix is not the same size. Since A here is not a number ?....
How can I do this. Otherwise I could only write a loop against t itself, which is extremely slow.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 SUBSREF (您仍然需要循环所有 < code>j's,不过):
这将返回数组在时间
t
的第j
元素的值。You can use SUBSREF for this (you still neet to loop over all
j
's, though):This returns the value of the
j
th element of the array at timet
.