[Insight-users] vnl_diag_matrix

Miller, James V (Research) millerjv at crd . ge . com
Mon, 12 May 2003 11:21:06 -0400


Sounds like a bug to me. 

We should fix this.


> -----Original Message-----
> From: Kumar T.R. [mailto:MaKumartr@netscape.net]
> Sent: Monday, May 12, 2003 8:41 AM
> To: insight-users@public.kitware.com
> Subject: [Insight-users] vnl_diag_matrix
> 
> 
> Hello Everyone
> 
> I observe that vnl_diag_matrix is intelligent (atleast  smart)
> 
> This I say because it crops itself to the size necessary for 
> multiplication
> 
> So if there is a 3x3 diagonal matrix and a 6x6  diagonal matrix
> Both can multiply with a 3x3 matrix (or can be even mutliplied)
> and you get the same result
> 
> For this I have attached a sample program for evaluating the same
> 
> And the result is as below
> 
> See A now
> 13 21 43
> 47 25 66
> 14 57 61
> 
> See B now
> 2 0 0
> 0 3 0
> 0 0 4
> 
> See B*A now
> 26 42 86
> 141 75 198
> 56 228 244
> 
> See B now
> 2 0 0 0 0 0
> 0 3 0 0 0 0
> 0 0 4 0 0 0
> 0 0 0 5 0 0
> 0 0 0 0 6 0
> 0 0 0 0 0 7
> 
> See B*A now
> 26 42 86
> 141 75 198
> 56 228 244
> 
> Strange but true
> I would be happy to receive any comments regarding the same
> 
> Regards
> Kumar
>