matlab集成的问题
我需要一些帮助,我真的需要解决这个问题。
首先谢谢您的时间...
我的问题:我有一个矩阵(826x826 double),我想将这个矩阵与(826x1 double)的向量积分我没有任何这个功能。是否有命令或算法来获取矩阵相对于向量的积分?请我真的需要帮助,我是 matlab 的新手。
真挚地。 乔治
I'd like some help please I really need to solve this problem.
Well before anything thank you for your time...
My problem: I have a matrix (826x826 double) and I want to integrate this matrix with respect to a vector of (826x1 double) I don't have the functions of any of this. Is there a command or an algorithm to take the integral of a matrix with respect to a vector? Please I really need help, I'm such a newbie at matlab.
Sincerely.
George
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果它是一个关于向量x积分的常数矩阵A,那么你的答案就是Ax + c,其中< strong>c 是一些常数向量。如果A是x的函数,您需要准确指定它是什么。另一种情况是A和x都是t的函数。没有一个简单的答案,在大多数情况下也没有计算机程序可以做到这一点。有一些书是写这个东西的。这不是一件容易的事。
If it's a constant matrix A integrated with respect to vector x, your answer in simply Ax + c where c is some constant vector. If A is a function of x, you will need to specify exactly what it is. Another case is when both A and x are functions of t. There is no one simple answer and no computer program would do it in most cases. There are books written in this stuff. It's not an easy task.
如果我理解正确的话,你有一个矩阵
Y
(大小 mxn)和一个向量X
(大小 mx1),其中Y(i, j) = f_j(X (i))
对于某些未知函数 f_j。要近似计算X
上每列的积分,您可以使用trapz
Matlab 函数,使用梯形方法。这将使用向量
X
将Y
沿着其列进行积分。如果您想沿行积分,可以调用 trapz 函数并添加参数dim=2
。当然,无论哪种情况,X 和 Y 的尺寸都必须兼容。If I understand correctly, you have a matrix
Y
(size mxn) and a vectorX
(size mx1) whereY(i, j) = f_j(X(i))
for some unknown function f_j. To approximate the integral of each column overX
you could use thetrapz
function of Matlab which uses the trapezoidal method.This will integrate
Y
along its columns using the vectorX
. If you wanted to integrate along rows you can call the trapz function with an added argument ofdim=2
. Of course, the dimensions of X and Y must be compatible in either case.