Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using workspace variable in m-file
Date: Sat, 6 Sep 2008 07:47:01 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 15
Message-ID: <g9tchl$l3v$1@fred.mathworks.com>
References: <g9t86u$cu5$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1220687221 21631 172.30.248.35 (6 Sep 2008 07:47:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 6 Sep 2008 07:47:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:488898



"jay kumar" <kumar.jay.123@gmail.com> wrote in message <g9t86u$cu5$1@fred.mathworks.com>...
> Hi,
> I want to use workspace variables in my m-file and i want to do some operation on that variables in m-file. but that variables and their values are available in workspace.
> 
> e.g I want to multiply two transfer functions and obtain bode plot for different values of parameters but that two transfer functions are available in workspace 
> 
> I do not want to write transfer functions again in m-file. Instead of that i want to obtain it from workspace.

What's wrong with passing the value of those variables (could be function handle of the transfer functions) into your m file???

The mechanism of input and output for functions is designed so that direct messing between workspace is minimal.

But if you insist, there is EVALIN for that.

Bruno