Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Algorithm 如何有效地实现这种奇偶矩阵分解?_Algorithm_Matlab_Performance_Linear Algebra - Fatal编程技术网

Algorithm 如何有效地实现这种奇偶矩阵分解?

Algorithm 如何有效地实现这种奇偶矩阵分解?,algorithm,matlab,performance,linear-algebra,Algorithm,Matlab,Performance,Linear Algebra,在数值求解偏微分方程时,我遇到了以下问题:如何在Matlab中高效地实现特定的矩阵向量积算法。为了便于记法,我将使用Matlab记法来表示问题 问题的背景是,我有一个矩阵,D,它的大小为NxN(N为偶数,N的典型值为4、6和8),它的性质是 D(i,j) = - D(N+1-i, N+1-j) 对于我来说,这个问题可能会在Sci上引起更多的关注。公司我投票结束这个问题,因为它已经在scicomp上得到了回答: e(n) = 0.5*(f(n) + f(N+1-n)) o(n) = 0.5*

在数值求解偏微分方程时,我遇到了以下问题:如何在Matlab中高效地实现特定的矩阵向量积算法。为了便于记法,我将使用Matlab记法来表示问题

问题的背景是,我有一个矩阵,D,它的大小为NxN(N为偶数,N的典型值为4、6和8),它的性质是

D(i,j) = - D(N+1-i, N+1-j) 

对于我来说,这个问题可能会在Sci上引起更多的关注。公司我投票结束这个问题,因为它已经在scicomp上得到了回答:
e(n) = 0.5*(f(n) + f(N+1-n))

o(n) = 0.5*(f(n) - f(N+1-n))
 De(n,m) = D(n,m) + D(n,N+1-m)

 Do(n,m) = D(n,m) - D(n,N+1-m).
 Df = [De*e + Do*o; -De*e + Do*o]
 e = 0.5*(f(1:N/2) + flipud(f(N/2+1:N)))

 o = 0.5*(f(1:N/2) + flipud(f(N/2+1:N)))
 eMat = 0.5*[1, 0, ..., 0, 0, ..., 0, 1;

             0, 1, ..., 0, 0, ..., 1, 0;

             |  |   |   |  |   |   |  |

             0, 0, ..., 1, 1, ..., 0, 0]


 oMat = 0.5*[1, 0, ..., 0,  0, ...,  0, -1;

             0, 1, ..., 0,  0, ..., -1,  0;

             |  |    |   |  |    |   |   |

             0, 0, ..., 1, -1, ...,  0, 0]
 e = eMat*f

 o = oMat*f
 Dee = De*eMat*f

 Doo = Do*oMat*f
 Dee + Doo
 Df = [Dee + Doo; -Dee + Doo]