Hi everyone,

I am a new PDL user and this is my first post to this list. I am
delighted with the power and flexibility of PDL and would like to use
it more often in my everyday work and modelling. I am now writing in
the hope that someone can give some advice on the following problem:

I have some m x 1 piddles representing values of different parameters
along a profile. As everyone in this list knows, PDL is very good at
doing maths in a one-to-one fashion, i.e. between cells with the same
index value. However, this time I need to calculate values using
different indexes, i.e.:

a(i) = [ b(i-1) - b(i+1) ] / dx

I would normally do this by operating inside a loop using standard
Perl arrays, but this time it will more convenient for me to use PDL
piddles and I therefore wonder if it would be possible to use a
built-in function that will allow me to do such calculations without
invoking loops.

I have already looked at the documentation (PDL::Indexing but I did
not manage to figure out a solution, so any hint will be appreciated.

Thanks

Hernán


--

Hernán De Angelis
Linux user # 397217

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to