"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
"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'))
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.