Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Syntactic Confectionery Delight
 
PerlMonks  

Re: Arrgghh! Perl and Matlab (round 2)

by tall_man (Parson)
on Aug 12, 2005 at 19:00 UTC ( [id://483450]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Arrgghh! Perl and Matlab (round 2)

There's an easier way to create your $Sqs matrix. I tried this with your example and the suggestion by ambrus about matrix multiplication, and it worked.
$Sqs = zeroes($V); $Sqs->diagonal(0,1) .= $S;

Replies are listed 'Best First'.
Re^2: Arrgghh! Perl and Matlab (round 2)
by ambrus (Abbot) on Aug 13, 2005 at 09:31 UTC

    There's an even easier way:

    $Sqs = stretcher($S);
    see PDL::MatrixOps.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://483450]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.