Debugging

Again, verify your Diagprod() on small test cases as below. (Don't try the full sized case!)
a=randn(10,1); %# Random column vector
B=randn(10,3); %# Random matrix
diag(a)*B %# Direct calculation from definition and octave operators
Diagprod(a,B) %# Your routine



Tomas Arias 2006-04-26