Home > Mateda2.0 > functions > generators > CreateGaussianValuesForFactors.m

CreateGaussianValuesForFactors

PURPOSE ^

[Table] = CreateGaussianValuesForFactors(totfactors,J,T)

SYNOPSIS ^

function [Table] = CreateGaussianValuesForFactors(totfactors,J,T)

DESCRIPTION ^

 [Table] = CreateGaussianValuesForFactors(totfactors,J,T)
 CreateGaussianValuesForFactors: Generate function using values from a Normal distribution of mean J and
                                 variance 1
 INPUTS
 totfactors: Number of cactors
          J: Mean of the Gaussian distribution
          T: Temperature parameter
 OUTPUTS
 Tables{i}: Contains the values for each of the 2^k configurations of
            factor 

 Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [Table] = CreateGaussianValuesForFactors(totfactors,J,T)
0002 % [Table] = CreateGaussianValuesForFactors(totfactors,J,T)
0003 % CreateGaussianValuesForFactors: Generate function using values from a Normal distribution of mean J and
0004 %                                 variance 1
0005 % INPUTS
0006 % totfactors: Number of cactors
0007 %          J: Mean of the Gaussian distribution
0008 %          T: Temperature parameter
0009 % OUTPUTS
0010 % Tables{i}: Contains the values for each of the 2^k configurations of
0011 %            factor
0012 %
0013 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0014 
0015 for i=1:totfactors
0016  Jij =  normrnd(J,1);  
0017  Table{i}(1) = Jij;
0018  Table{i}(2) = -1*Jij;
0019  Table{i}(3) = -1*Jij;
0020  Table{i}(4) = Jij;
0021  Table{i} = exp(Table{i}/T);
0022 end,

Generated on Fri 04-Dec-2009 13:38:29 by m2html © 2003