Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Combine columns and find the sum for the matched columns from
Date: Tue, 17 Apr 2012 19:49:14 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 43
Message-ID: <jmkhfq$k0o$1@newscl01ah.mathworks.com>
References: <jmkbeg$pdt$1@newscl01ah.mathworks.com> <jmkgo2$mb1$1@speranza.aioe.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1334692154 20504 172.30.248.47 (17 Apr 2012 19:49:14 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 17 Apr 2012 19:49:14 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1421302
Xref: news.mathworks.com comp.soft-sys.matlab:764899

Hi
Here, a perfect match is the match of coordinates (x,y) from table 1 and table 2 (first 2 columns). I am trying to read data from excel files using matlab and try to get the sum for the matching coordinates and write the output in a single text or excel file for further analysis.  

Thank You.

dpb <none@non.net> wrote in message <jmkgo2$mb1$1@speranza.aioe.org>...
> On 4/17/2012 1:06 PM, sagar poudel wrote:
> > Hi
> > I am getting a problem while combining two columns (x, y) in a matrix
> > (from first excel file). After the first step, I need to match the
> > combined name (x,y) with similar name from a second matrix (from a
> > second excel file). Then I need to find the sum of rows matching the
> > name from the first matrix.
> > Here is an example.
> >
> > Table 1 Table 2
> > 1.2 1.4 1.2 1.3 20
> > 1.2 1.6 1.2 1.4 30
> > 1.2 1.8 1.2 1.6 20
> > 1.3 1.4 1.3 1.4 35
> > 1.3 1.6 1.3 1.8 40
> > 1.3 1.9 1.3 1.9 20
> >         1.3 2.1 35
> >
> > Here, the tables above have all numerical values. I have to match the
> > columns 1 and 2 (x,y)(combined) from table 1 (all) with columns 1 and 2
> > (combined) (x,y) of Table 2. Then, based on perfect match, I have to
> > find the sum of third column from table 2....
> 
> As Bruno notes, the relationship to Matlab seems tenuous at best.
> I _presume_ you're thinking of doing whatever it is that you want to do 
> w/ the data from Excel by either interacting w/ Excel from Matlab or 
> bring the data into Matlab from Excel and put the results back is the 
> connection.
> 
> Undoubtely somebody here can process the arrays as you wish if you can 
> explain precisely what it is that you mean in the above description. 
> Give an example of what you mean by "perfect match" and what the results 
> should be for the sample data.
> 
> Where a "name" comes from in the description I've no clue...
> 
> --