Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Arrgghh! Perl and Matlab (round 2)

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


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;


Comment on Re: Arrgghh! Perl and Matlab (round 2)
Select or Download Code
Re^2: Arrgghh! Perl and Matlab (round 2)
by ambrus (Abbot) on Aug 13, 2005 at 13: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
Node Status?
node history
Node Type: note [id://483450]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (13)
As of 2015-07-06 13:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (74 votes), past polls