Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!transit3.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!d1g2000hsg.googlegroups.com!not-for-mail
From: Andrew <andrewkgentile@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using workspace variable in m-file
Date: Sat, 6 Sep 2008 07:01:46 -0700 (PDT)
Organization: http://groups.google.com
Lines: 13
Message-ID: <33eac32d-6e15-4ff2-895f-f04ec68458d0@d1g2000hsg.googlegroups.com>
References: <g9t86u$cu5$1@fred.mathworks.com>
NNTP-Posting-Host: 65.19.222.166
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1220709706 27413 127.0.0.1 (6 Sep 2008 14:01:46 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 6 Sep 2008 14:01:46 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: d1g2000hsg.googlegroups.com; posting-host=65.19.222.166; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) 
Xref: news.mathworks.com comp.soft-sys.matlab:488939



On Sep 6, 12:33 am, "jay kumar" <kumar.jay....@gmail.com> wrote:
> 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.

If you define the transfer functions in the workspace (from the
command page, I assume), then they are already in the workspace.  The
m-file will already see the variable, unless you begin your m-files as
I do with clear all; close all commands.  Once the variables are in
the workspace, the m-file will automatically recognize them.