source: roaraudio/tools/create-matrix @ 6056:8d4468a24909

Last change on this file since 6056:8d4468a24909 was 32:b70011de1251, checked in by phi, 16 years ago

added a script to calc a polynom approx matrix

  • Property exe set to *
File size: 411 bytes
Line 
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6my $i;
7my $j;
8my $line;
9my $row = 'A';
10my $size = int($ARGV[0]);
11
12die unless $size > 0;
13
14$line = '';
15$j = 'a';
16for ($i = 0; $i < $size; $i++) {
17 $line .= sprintf('%4s ', $j++);
18}
19print $line, "\n";
20
21for ($i = 0; $i < $size; $i++) {
22 $line = '';
23
24 for ($j = ($size - 1); $j >= 0; $j--) {
25  $line .= sprintf('%4i ', $i**$j);
26 }
27
28 print $line, ' ', $row++, "\n";
29}
30
31#ll
Note: See TracBrowser for help on using the repository browser.