Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matrix matching
Date: Fri, 14 Aug 2009 15:38:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 45
Message-ID: <h640db$l0g$1@fred.mathworks.com>
References: <h61k2i$p69$1@fred.mathworks.com> <h61m3t$kcd$1@fred.mathworks.com> <h61oce$qq7$1@fred.mathworks.com> <h61qge$mgt$1@fred.mathworks.com> <h63ul3$hn5$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1250264299 21520 172.30.248.38 (14 Aug 2009 15:38:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 14 Aug 2009 15:38:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1895050
Xref: news.mathworks.com comp.soft-sys.matlab:563447

"charles atlas" <mufasa1234555@yahoo.com> wrote in message <h63ul3$hn5$1@fred.mathworks.com>...
> "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <h61qge$mgt$1@fred.mathworks.com>...
> > "charles atlas" <mufasa1234555@yahoo.com> wrote in message <h61oce$qq7$1@fred.mathworks.com>...
> > > "us " <us@neurol.unizh.ch> wrote in message <h61m3t$kcd$1@fred.mathworks.com>...
> > > > to stupidly copy/paste hundreds of lines of idiosyncratic and (therefore) useless data into this NG is considered unintelligent behavior by most CSSMers...
> > > > come up with a small input/output sample...
> > > > us
> > > 
> > > Woa buddy, first of all I was not trying to be a jerk or display too much information to the point where people would get confused and/or get annoyed.
> > > I posted that much information to be sure that people knew what I meant.
> > > If you are that offended by the overly large amount of information that I posted then you have either way too much time on your hands to waste a few minutes out of your life with the sole purpose of ridiculing me or you are somebody that gets a rise out of putting other people down while creating the illusion that you are helping them use the forums better. Either way you are not helping but you are merely making other people feel worse about themselves. 
> > > I'll tell you what I am going to do.
> > > -I will take your advice and when I post on the forums again I will use smaller examples.
> > > -I will continue to wait for somebody that has any information that will actually be beneficial to my time and will help me solve my dilemma.
> > 
> >   I agree with Urs that you have devoted too much of your text giving extended array examples and too little explaining in good English what you mean.  As an example of the latter, you have not specified whether you wish to treat an A-B pair in which rows in A and in B can be encountered in which neither row can ever be matched with a row in the other.  A good algorithm to carry out your desired action is going to run up against just that possible question.  Also are you guaranteeing that all matching between elements represent monotonicity - that is, if row i1 of A and j1 of B match and similarly i2 of A and j2 of B, do you always have i1 < i2 and j1 < j2 (or visa versa?)
> > 
> >   It would be far better to spend time giving a much more precise explanation of your problem than in presenting long but overly obvious examples.
> > 
> > Roger Stafford
> 
> 
> I am sorry if I did not fully explain my problem. Let me try to explain what I meant in more detail. 
> 
> data sets A and B will always be the same. That is to say the rows of each data set will always correspond to each other. Only in certian cases will some rows from A OR B be missing. If A has a few missing rows, B will always have the right amount of rows of data. If B has a few missing rows than A will have the right amount of rows. In other cases both A and B will have the right amount of rows and they will be the exact same data sets. In this case I want the program to recognize that and to not change either of the two sets of data. I only want the program to insert a row of zeros into either of the two data sets that contains the missing rows. 
> 
> My intentions when I posted this message were not to irritate anyone who runs or who uses these forums. I simply am a very visual person and I wanted to show everybody what I meant using a large set of data. This is because if I were another person using these forums and I saw this post, I would better understand that person's questions by seeing exactly what they needed to do and all of their data as apposed to having thier problem explained to me via a verbal explanation.

% A short example is visually clearer.  
% Does this accurately describe what you want?

% input:
A=[1 1;
     1 1;
     1 2;
     2 3];

B=[1 1;
     2 3];

% desired output:
C=[1 1;
     0 0;
     0 0;
     2 3];