随机矩阵2 [英] random matrices 2

查看:112
本文介绍了随机矩阵2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想生成100 random平方6x6矩阵A=[a_{ij}]Gaussian noise(标准偏差为0.5的修改),满足以下特征:

I would like to generate 100 random square 6x6 matrices A=[a_{ij}] with Gaussian noise (modification with standard deviation 0.5) satisfying the following characteristics:

 1. multiplicative inverse: i.e., a_{ij}=1/a_{ji} for all i,j=1,2,...,6.
 2. all entries are positive: i.e., a_{ij}>0 for all i,j=1,2,...,6.
 3. all diagonal elements are 1: i.e, a_{ii}=1 for all i=1,2,..,6.
 4. transitive: i.e., a_{ih}*a_{hj}=a_{ij} for all i,j,h=1,2,...,6.

到目前为止,我尝试使用matlab函数randn(6)*0.5.但是,我错了矩阵.我想知道是否有人可以帮助我?

So far, I tried to use a matlab function randn(6)*0.5. But, I got wrong matrices. I was wondering if anyone could help me?

这是我的matlab代码:

clc;clear;
n=6;
m=0;
A=randn(n)*0.5; % random matrix with guassian noise
for i=1:n
    for j=1:n
     for h=1:n
         while m<100  % generate 100 random matrices
             m=m+1;
             A=randn(n)*0.5;   % random matrix with guassian noise \sigma=0.5

             A(i,j)>0
                A(i,j)==1/A(j,i);
                A(i,h)*A(h,j)==A(i,j)
             if i==j && j==h
                 A(i,j)==1;
             end
         end
     end
    end
end
 A       

推荐答案

这主要是一个数学问题,而不是编程问题.首先,您必须查看约束并加以解决.我结束了:

This is primarily a math question, not a programming question. First you have to look at the constraints and solve them. I ended up with:

[  1,  1/X2,  1/X3,  1/X4,  1/X5]
[ X2,     1, X2/X3, X2/X4, X2/X5]
[ X3, X3/X2,     1, X3/X4, X3/X5]
[ X4, X4/X2, X4/X3,     1, X4/X5]
[ X5, X5/X2, X5/X3, X5/X4,     1]

这意味着您必须从所有其他值中随机选择X2,X3,X4,X5.在这里,我面临着我无法解决的挑战.当我为这些变量选择标准差0.5时,计算出的变量将具有更高的标准差.

This means you have to randomly choose X2,X3,X4,X5, from there all other values. Here I face a challenge I can not solve. When I choose a standard deviation of 0.5 for those variables, the calculated variables will have a higher standard deviation.

这篇关于随机矩阵2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆