Help for this page

Select Code to Download


  1. or download this
    my @realval = (
        0.994704478,
    ...
    my @row_index = qw( 1 2 3 4 5 1 3 1 2 1 2 1 2);
    my @col_index =  qw(1 2 3 4 5 5 3 2 1 3 3 4 4);
    my @mat_dim  = (5,5); # M always equal to N
    
  2. or download this
     my @actual_mat = (
    
    ...
    # the corresponding (@row,@index) as coordinate;
    # e.g. to assign $real_value[-1] into  
    # $actual_mat[$row_index[-1]-1,$col_index[-1]-1);
    
  3. or download this
    my @p = (0.4,0.2,0.2,0.2,0.2);
    
  4. or download this
    my $result = [
         0.3989409,
    ...
         0.2000000,
         0.2000000,
    ];