/perl-matrix

Calculating n-size matrix's determinant and the product of two matrixes' multiplication.

Primary LanguagePerl

perl-matrix

Calculating n-size matrix's determinant and the product of two matrixes' multiplication

Example

File with data

  1 2 3 4 6
  4 5 6 5 8
  7 8 20 5 15
  5 5 5 5 0
  5 5 5 5 5
  -
  2 4 6
  1 3 5
  7 8 9
  8 9 5
  0 4 1

Result

  <Multiplication>
  
  57 94 69 
  95 156 136 
  202 317 302 
  90 120 125 
  
  <Determinant>
  
  -550

Installation

  git clone https://github.com/MingaudasVagonis/perl-matrix.git
  cd perl-matrix

Running

  perl matrix.pl input.txt [m for multiplaction | d for determinant]