Hi,
I am trying to use t-linear to transform a "collection" of points. What would be
the right way of doing that? As an example, let's say I want to stretch all
coordinates in $a by a factor of 3:
#!/usr/bin/perl
use PDL;
use PDL::Matrix;
use PDL::Transform;
$a = mzeroes(2,1, 10);
for ($i = 0; $i < 10; $i++) {
$a->set(0,0,$i,$i);
$a->set(1,0,$i,$i);
}
print $a;
$f = t_linear(s=>3);
$d= $a->apply($f);
print $d;
This code doesn't work, gives an error
PDL: Dim mismatch in matmult of [2x2] x [2x1]: 2 != 1
(Why?)
However, if I were to change the line $a = mzeroes(2,1, 10); to $a =
mzeroes(2,2, 10); it gives me an answer, but I've just added unnecessary entries
to my collection of points.
Thanks
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl