Path: news.mathworks.com!not-for-mail
From: "rohan patel" <rpatel133@live.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to make rows and columns from excel files? please help
Date: Wed, 4 Nov 2009 05:29:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <hcr3eu$flo$1@fred.mathworks.com>
References: <hcqkgq$n9$1@fred.mathworks.com> <hcr0t0$8r2$1@fred.mathworks.com>
Reply-To: "rohan patel" <rpatel133@live.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257312543 16056 172.30.248.37 (4 Nov 2009 05:29:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 05:29:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2075713
Xref: news.mathworks.com comp.soft-sys.matlab:582242


"ade77 " <ade100a@gmail.com> wrote in message <hcr0t0$8r2$1@fred.mathworks.com>...
> Actually, the code below will do the job for you, not only  will it find all the rows, it will also give the actual name of the string like ikitty, ShootEmUp etc
> 
> [numbers, text] = xlsread('your excel file');
> u = size(text);
>  for i = 2:u     
> V = genvarname(text{i,1});
> eval([V '= numbers(i-1,:);']);
>  end
> clear V u i  numbers text      % you can remove this last line if you like.
> 
> The last line of code is just to free memory. The only thing you will have left is your game variables and the associated arrays.

okay, thanks, but now i have another problem i want to find the total number of quantity sold in for each game so how would i "for loop" it to add to get results for each game?