Angharad has asked for the wisdom of the Perl Monks concerning the following question:
Now although I have now managed to produce the the matrices in question (using SVD function in PDL) I'm slightly bemused as to how to go about creating the 'RecA' matrix. I've been reading about PDL::slice and have worked out how to extract certain values from a PDL matrix but have to admit I am a bit lost. Any help would be appreciated, as always.ns =2; [U,S,V] = svd(A,0); #v transposed Vt = V'; #reconstruct the data using a specified number of the most significant + datasets recA = U(:,1:ns)*S(1:ns,1:ns)*Vt(1:ns,:)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: matlab to perl
by newroz (Monk) on Aug 12, 2005 at 11:57 UTC | |
|
Re: matlab to perl
by Anonymous Monk on Aug 13, 2005 at 00:30 UTC |