www.scilab.org

Decision Matrix Analysis

//////////////////////////////////////////////////////////////////////////////
//
//        Decision Matrix Analysis demonstration (version 2008/08/06)
//                  Copyright (C) 2008 Christophe DAVID
//        http://www.christophedavid.org/w/c/w.php/Files/DecisionAid
//
//  This program is free software; you  can redistribute it and/or modify it
//  under the terms of the GNU General Public License version 2 as published
//  by the Free Software Foundation (http://www.gnu.org/licenses/gpl.html).
//
//////////////////////////////////////////////////////////////////////////////


//                This program was last tested with Scilab 4.1.2
//                            http://www.scilab.org

//////////////////////////////////////////////////////////////////////////////

errclear      // clear all errors
clear;        // kill variables
clearglobal   // kill global variables
clc;          // clear command window
tohome;       // move the cursor to the upper left corner of the Command Window
clf;          // clear or reset the current graphic figure (window) to default values
clear_pixmap; // erase the pixmap buffer

//////////////////////////////////////////////////////////////////////////////

function [OutputMatrix] =  CorrelationMatrix(InputMatrix)
    [_rows, _cols] = size(InputMatrix);
    for i = 1:_cols
        mu  = mean(InputMatrix(:, i));
        sgi = 1.0 / (sqrt(_rows - 1) * stdev(InputMatrix(:, i)));
        InputMatrix(:, i) = (InputMatrix(:, i) - mu) * sgi;
    end
    OutputMatrix = InputMatrix' * InputMatrix;
endfunction

//////////////////////////////////////////////////////////////////////////////

DecisionMatrix = [
                   10,  1000,  800,  48,  49, 50;
                   20,  2000,  600,  92,  93, 51;
                   30,  3000,  400,  12,  13, 48;
                   40,  4000,  300,  0,   1,  48;
                   50,  5000,  200,  6,   7,  51;
                 ]

CorrelationMatrix(DecisionMatrix)

//////////////////////////////////////////////////////////////////////////////
 

Test Decision Matrices

<< de Borda's method | index | Shamir's method 'How to share a Secret' >>

   
Google
 
Web www.christophedavid.org