in reply to Arrgghh! Perl and Matlab (round 2)
$Sqs = zeroes($V); $Sqs->diagonal(0,1) .= $S; [download]
There's an even easier way:
$Sqs = stretcher($S); [download]