Hi PDL-List,

I have hopefully a quick query (easily answered) ...

In matlab if you want to create a sequence from -255 to 255 by 0.1 you'd
code in ``x = -255:0.1:255;''

I have read through the following PDL functions (sequence , xlinvals , etc.
) and while I can manage to do a sequencing from I can't seem to figure out
the syntax to do what I want. Here is the bit of code that I have:

use strict;
use bignum;
use Math::Trig qw(:pi :radial :great_circle);
use PDL;

my $bw = 50000; #band width in Hz
my $b0 = 180; #start bearing in deg.TrueN
my $bN = 349; #stop bearing in deg.TrueN
my $db = 5; #delta bearing in degrees
my $dr = 3.15; #delta range in kilometres
my $rN = 220; #stop range in kilometres
my $ln = 116; #longitude
my $lt = -32; #latitude

# convert geographic bearings in degrees to cartesian angles in radians
$b0 = ( (90-$b0)%360 )*pi / 180;
$bN = ( (90-$bN)%360 )*pi / 180;
$db = $db*pi / 180;

# piddle-fy bearings
my @bears = map { $db x $_ } $b0..$bN;
my $bs = pdl @bears;
my @d = $bs->dims;
print "@d\n"; *  *
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to