Path: news.mathworks.com!not-for-mail From: "Milos Milenkovic" <m.milenkovic@mathworks.com> Newsgroups: comp.soft-sys.matlab Subject: Re: Special matrix multiplication Date: Thu, 15 Mar 2012 20:47:18 +0000 (UTC) Organization: Faculty of Transport & Traffic Engineering Lines: 35 Message-ID: <jjtkgm$k9n$1@newscl01ah.mathworks.com> References: <jgj6ir$rj7$1@newscl01ah.mathworks.com> <jgkpke$kf6$1@newscl01ah.mathworks.com> <79fc2a0e-f25d-42be-b1d4-2d3f8ba963d6@b23g2000yqn.googlegroups.com> <jgrlve$roe$1@newscl01ah.mathworks.com> <jgrp3v$8lm$1@newscl01ah.mathworks.com> <jgrvoj$34u$1@newscl01ah.mathworks.com> <jgs5i5$nfp$1@newscl01ah.mathworks.com> <jjt49l$nak$1@newscl01ah.mathworks.com> <jjtffu$3hn$1@newscl01ah.mathworks.com> Reply-To: "Milos Milenkovic" <m.milenkovic@mathworks.com> NNTP-Posting-Host: www-05-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: newscl01ah.mathworks.com 1331844438 20791 172.30.248.37 (15 Mar 2012 20:47:18 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 15 Mar 2012 20:47:18 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1282758 Xref: news.mathworks.com comp.soft-sys.matlab:761122 Dear Roger, thanks again, I already tried to modify your first code on just the same way as you proposed, but the result is not correct, I will try tomorrow and then ask for help. Do you have some good propossal for if statement, how to check the positiveness of bi and ei? This is the procedure for fuzzy numbers multiplying, so I used it in multiplying matrices composed from fuzzy numbers. Thanks once again! Best, Milos "Roger Stafford" wrote in message <jjtffu$3hn$1@newscl01ah.mathworks.com>... > "Milos Milenkovic" <m.milenkovic@mathworks.com> wrote in message <jjt49l$nak$1@newscl01ah.mathworks.com>... > > ....... > > This is ok, but now I have to make this multiplication with respect to sign of these (ai,bi,ci) numbers, so if (ai,bi,ci) and (di,ei,fi) are >0 (they are >0, if bi and ei >0) then the upper solution is ok, > > but when bi or ei is <0 than I have to apply next rule: > > (ai,bi,ci)*(di,ei,fi) = (ei*ai+bi*(fi-ei), bi*ei , ei*ci+bi(di-ei)) > > Or, if (ai,bi,ci) and (di,ei,fi) are both <0 (they are <0, if bi and ei <0) > > (ai,bi,ci)*(di,ei,fi) = (ei*ci+bi*(fi-ei), bi*ei , ei*ai+bi(di-ei)) > > ....... > - - - - - - - - - - - > Hello again Milos. The rules I gave you earlier can easily be revised to the following for the two new cases: > > A1 = A(:,1:3:n); A2 = A(:,2:3:n); A3 = A(:,3:3:n); > B1 = B(:,1:3:n); B2 = B(:,2:3:n); B3 = B(:,3:3:n); > C1 = A1*B2+A2*(B3-B2); C2 = A2*B2; C3 = A3*B2+A2*(B1-B2); > C(:,3:3:end) = C3; C(:,2:3:end) = C2; C(:,1:3:end) = C1; > > and > > A1 = A(:,1:3:n); A2 = A(:,2:3:n); A3 = A(:,3:3:n); > B1 = B(:,1:3:n); B2 = B(:,2:3:n); B3 = B(:,3:3:n); > C1 = A3*B2+A2*(B3-B2); C2 = A2*B2; C3 = A1*B2+A2*(B1-B2); > C(:,3:3:end) = C3; C(:,2:3:end) = C2; C(:,1:3:end) = C1; > > However, neither of these two new definitions are associative. In other words, if P, Q, and R are matrices of this kind, it is no longer true that P*(Q*R) is identically equal to (P*Q)*R where '*' represents either of your new multiplication rules. Your original special multiplication was in fact associative as I mentioned earlier. This makes me suspicious of your two new kinds of multiplication operators. Any "multiplication" which is not even associative is in my opinion a very ugly kind of multiplication and hardly worthy of the name. What in the world are you using it for? > > Roger Stafford