Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!feed.cgocable.net!pd7cy3no!pd7cy4no!shaw.ca!pd7urf2no.POSTED!53ab2750!not-for-mail
X-Trace-PostClient-IP: 24.79.146.116
From: Walter Roberson <roberson@hushmail.com>
Organization: Canada Eat The Cookie Foundation
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
Subject: Re: [quick Q] how to run a scirpt in my .m file? Thanks!
References: <f64841f0-c4ff-49b8-a25e-8c4b6c5796ae@m45g2000hsb.googlegroups.com>
In-Reply-To: <f64841f0-c4ff-49b8-a25e-8c4b6c5796ae@m45g2000hsb.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 16
Message-ID: <POsqk.196532$gc5.181676@pd7urf2no>
Date: Tue, 19 Aug 2008 05:25:03 GMT
NNTP-Posting-Host: 24.66.94.143
X-Complaints-To: abuse@shaw.ca
X-Trace: pd7urf2no 1219123503 24.66.94.143 (Mon, 18 Aug 2008 23:25:03 MDT)
NNTP-Posting-Date: Mon, 18 Aug 2008 23:25:03 MDT
Xref: news.mathworks.com comp.soft-sys.matlab:486158



Learner wrote:

> I have saved a code segment as a.m, and I want to run it as part of
> code b.m.  What should I write in b.m in order to call "a.m"?

You would write the line

a

That is, just give the name of the .m file, but without the .m
(and without any directory information.)

-- 
Q = quotation(rand);
if isempty(Q); error('Quotation server filesystem problems')
else sprintf('%s',Q), end