Which command can I use to obtain numerical answers instead algebraics.
1 view (last 30 days)
Show older comments
clear all
% Example
R1=500; R2=250; C=2e-6; L=0.25; W=1000; phi=0;
Vs=20*exp(j*phi*pi/180);
XC=(1/(1*j*W*C));
XL=(1*j*W*L);
% Applying Mesh Analysis
eqn1='I1*(R1+XC)-I2*(XC)=Vs';
eqn2='-I1*(XC)+I2*(R2+XL+XC)=0';
[i1 i2]=solve (eqn1,eqn2,'I1','I2')
Matlab’s answers:
i1 =(Vs*(R2 + XC + XL))/(R1*R2 + R1*XC + R2*XC + R1*XL + XC*XL)
i2 =(Vs*XC)/(R1*R2 + R1*XC + R2*XC + R1*XL + XC*XL)
Note: I need to know a command that I can use to obtain a numerical answer instead an algebraic.
0 Comments
Accepted Answer
Walter Roberson
on 1 Apr 2012
Make these changes:
syms I1 I2
eqn1 = I1*(R1+XC)-I2*(XC) - Vs;
eqn2 = -I1*(XC)+I2*(R2+XL+XC) - 0;
More Answers (0)
See Also
Categories
Find more on Numbers and Precision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!