Perl PDL module - assign index (newbie)

From: Gerry Lawrence (gkl127_at_yahoo.com)
Date: 04/21/04


Date: 20 Apr 2004 16:55:03 -0700

Hi,

I'm using PDL for some matrix operations. I have a simple 2-D matrix
that looks like:

$s = pdl [[3.34, 2.54]];

which I need to convert to:

[[3.34, 0],[0,2.54]]

Can anyone tell me how to do this?

Thanks in advance,

Gerry Lawrence