Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Ezplot constants?
Date: Sat, 17 Oct 2009 15:09:07 -0400
Organization: The MathWorks, Inc.
Lines: 43
Message-ID: <hbd4nc$732$1@fred.mathworks.com>
References: <hbcotn$e16$1@fred.mathworks.com> <BioCm.23531$cL1.21749@newsfe20.iad>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1255806508 7266 172.31.44.65 (17 Oct 2009 19:08:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 17 Oct 2009 19:08:28 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:578086



"Nasser M. Abbasi" <nma@12000.org> wrote in message 
news:BioCm.23531$cL1.21749@newsfe20.iad...
>
> "David Doria" <daviddoria@gmail.com> wrote in message 
> news:hbcotn$e16$1@fred.mathworks.com...
>>I want to plot some quadratic functions with varying coefficients, for 
>>example:
>>
>> syms x
>> syms y
>> ezplot('2*x^2 + 3*y^2 = 1')
>>
>> but I want to iterate/vary the '2' and '3' in that expression, something 
>> like
>> a = 2
>> b = 3
>> ezplot('a*x^2 + b*y^2 = 1')
>>
>> but of course a and b aren't recognized inside the ' ' .
>>
>> How should I do this?
>>
>> Thanks,
>>
>> Dave
>
> a = 10
> b = 11
> ezplot(subs('a*x^2 + b*y^2 = 1'))

Another alternative:

a = 10;
b = 11;
ezplot(a*x^2+b*y^2-1)

-- 
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ