[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
mbrouillet
General User

Joined: 06 May 2010
Posts: 13

 Posted: Tue Apr 19, 2011 1:11 am    Post subject: Vector calculation diregards order of vectors. {A*B} = {B*A} I can't believe this. I make two vectors, one line and one column, and when I multiply the two I get the same result independently of the order. This is just completely wrong. .......................C1=3 .......................C2=4 A3=1 B3=2 ..... ? In C3 I enter the following : "=C1:C2*A3:B3" and I end it with CTRL+SHIFT+ENTER. This fills me the area C3:D4 with correct data (3 ; 6 ; 4 ; 8 ). But if I put the following in C3 : "=A3:B3*C1:C2" and end it with CTRL+SHIFT+ENTER, I get the same result ! It should not. I should only have a 1x1 result in C3, with value 11 (3*1+4*2). With vectors, A*B is not equal to B*A. If A is of size m*n and B of size o*p, then A*B is of size n*o while B*A is of size p*m. This is just terrible ! Am I the only one suffering from this bug ? Am I just doing something wrong ? It seems quite incredible. OpenOffice 3.2.1 OOO320m18 (Build:9502).
ken johnson
Super User

Joined: 23 Apr 2009
Posts: 1851
Location: Sydney, Australia

 Posted: Tue Apr 19, 2011 5:13 am    Post subject: To do matrix multiplication with spreadsheet arrays you need to use the MMULT function, which must be entered as an array function. =MMULT(A3:B3;C1:C2)=11 =MMULT(C1:C2;A3:B3)={3;4|6;8} Ken Johnson_________________If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum