Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: eval begone!  (part 2)
Date: Mon, 21 Apr 2008 19:50:52 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 15
Message-ID: <fuir6s$r1r$1@canopus.cc.umanitoba.ca>
References: <fuiqo8$heq$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1208807452 27707 192.70.172.160 (21 Apr 2008 19:50:52 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Mon, 21 Apr 2008 19:50:52 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:464399


In article <fuiqo8$heq$1@fred.mathworks.com>,
jay vaughan <jvaughan5.nospam@gmail.com> wrote:
>I am continuing the process of purging eval statements from
>my code, but got stuck on another one.

>func_basename = 'my_func';
>FileName = uigetfile;
>func_name = get_most_recent_func(func_path, func_basename);
>eval([func_name '(''' FileName ''')']);

func_handle = str2func(func_name);
func_handle(FileName);
-- 
  "Is there any thing whereof it may be said, See, this is new? It hath
  been already of old time, which was before us."    -- Ecclesiastes