solving equations

3 Ansichten (letzte 30 Tage)
Brian
Brian am 16 Apr. 2011
I am having difficulty solving an equation with a symbolic variable. If anyone has any suggestions please help!
EDU>> r1=330;
EDU>> r2=1000;
EDU>> c=.47*10^-6;
EDU>> syms f;
EDU>> w=2*pi*f;
EDU>> xc=1/(i*w*c);
EDU>> Vin=1;
EDU>> Vout=(Vin*r2*xc^2)/(1000*r1*(r2+xc)+r2*xc*(xc+1000));
EDU>> solve('abs(Vout)=.707')
ans =
0.707*exp(0.0)
EDU>> solve(abs(Vout)-.707)
Warning: Explicit solution could not be found.
> In solve at 81
ans =
[ empty sym ]

Antworten (1)

Walter Roberson
Walter Roberson am 17 Apr. 2011
I do not have the Symbolic toolbox to test with.
The first form, with the quoted string, is not going to produce the answer you want because at that point the value of Vout has not been transfered from Matlab to the symbolic engine. Try
solve(subs('abs(Vout)=0.707'))
According to a different symbolic package I tried, there are four solutions, all complex:
-((25000/1551)*I)*(-133+(4489+13200*2^(1/2))^(1/2))/Pi
((25000/1551)*I)*(133+(4489+13200*2^(1/2))^(1/2))/Pi
(25000/1551)*(133*I-(-4489+13200*2^(1/2))^(1/2))/Pi
(25000/1551)*(133*I+(-4489+13200*2^(1/2))^(1/2))/Pi
To get these, I substituted 47*10^(-8) for your 0.47*10^(-6) so that the symbolic package would not convert everything to floating point.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by