solving equations
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 ]
0 Commenti
Risposte (1)
Walter Roberson
il 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.
0 Commenti
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!