【问题标题】:Generating complex antisymmetric matrix in Matlab在 Matlab 中生成复杂的反对称矩阵
【发布时间】:2018-10-31 07:15:10
【问题描述】:

是否有可能在 Matlab 中生成高斯随机复反对称矩阵? 我尝试过使用 randn(M)。但这只是给出了高斯分布的随机矩阵。

【问题讨论】:

  • 您需要定义随机高斯矩阵的含义。条目应该是 i.i.d 吗?圆形对称?见here

标签: matlab matrix gaussian sampling


【解决方案1】:

这将为您提供一个数字从 0 到 x 的高斯随机复反对称矩阵 M。如果你改变 x,你就改变了 RNG 的上限。

n = 5; %rows and columns
M = ones(n,n); %matrix initiation
x = 50; %limit of random number generator; 

for i = 1 : n

   M(i,:) = complex(round(50.*randn(1,n)),round(50.*randn(1,n))); %generate random number for the row;
   M(:,i) = M(i,:).'; % take the same number and put it in the antisymmetric slot

end %for 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多