On 4-Mar-2009, Jaroslav Hajek wrote: | But why, by heaven? What's so wrong with diag(sparse(vector))? Nothing. I just didn't realize that diag would generate a sparse matrix. I was thinking that it would only generate a diagonal matrix object. jwe