Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!p8g2000yqb.googlegroups.com!not-for-mail
From: TideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to make rows and columns from excel files? please help
Date: Tue, 3 Nov 2009 23:20:09 -0800 (PST)
Organization: http://groups.google.com
Lines: 23
Message-ID: <906c25c5-8e8e-4361-856d-6b1b077addb3@p8g2000yqb.googlegroups.com>
References: <hcqkgq$n9$1@fred.mathworks.com> <hcr0t0$8r2$1@fred.mathworks.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257319209 23464 127.0.0.1 (4 Nov 2009 07:20:09 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 4 Nov 2009 07:20:09 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p8g2000yqb.googlegroups.com; posting-host=202.78.152.105; 
	posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:582276


On Nov 4, 5:45 pm, "ade77 " <ade1...@gmail.com> wrote:
> 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.

Please do not top post.  It makes the thread hard to follow.  Put your
reply UNDERNEATH.

You are out of order suggesting eval to a newbie.
It is exactly the wrong way to do things.