Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: "include" a .m file into another .m file
Date: Thu, 13 Sep 2007 16:11:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <fcbnen$rdu$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1189699863 28094 172.30.248.38 (13 Sep 2007 16:11:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 13 Sep 2007 16:11:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1080461
Xref: news.mathworks.com comp.soft-sys.matlab:428379



Hey
I was wondering if matlab supports adding all text from a
.m-file (not a function file just code that runs buy it
self) to another .m file that I'm running.
Like php scripts that you can import anywhere in your php
file buy just typing include(FILENAME). 
So I have a file test.m that is a function. I call it
test(obj) and it starts running. It comes to an "include"
statement and it just keeps running through the included
file with all it's calculations and stuff and when it comes
to the end of the file it just continues in the test file
with the line after the "include" statement.

Why I need this. I get files from another guy that is
written as just code and I like to be able to run the file
in my code without changing anything in his file since he is
updating it all the time to a CVS system...so I can't change
the file everytime he puts up a new file. 

Thanks 
HS