Re: 2D array of real numbers
- From: Mirco Wahab <wahab@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 29 Aug 2007 16:22:22 +0200
jeanluc wrote:
I want to create a 2D array whose values initially contains 0.0
To define a 50x63 2D arbitrary array filled with 0.0.
Anybody know how to do this?
...
use constant NROW => 50; # set number of rows
use constant NCOL => 63; # set number of columns
my @Arr2D =
map [ ( 0.0 ) x NCOL ], # generate single ROW of NCOL COLUMNS
1 .. NROW; # NROW ROWS
print map "@$_\n", @Arr2D;
...
Regards
M.
.
- Follow-Ups:
- Re: 2D array of real numbers
- From: jeanluc
- Re: 2D array of real numbers
- References:
- 2D array of real numbers
- From: jeanluc
- 2D array of real numbers
- Prev by Date: Re: Mac: Perl script that will run when double-clicked
- Next by Date: Re: great and better hash eval
- Previous by thread: Re: 2D array of real numbers
- Next by thread: Re: 2D array of real numbers
- Index(es):