PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

206 Practical MATLAB® Applications for Engineers


figure(3)
ezplot(y1)
hold on
ezplot(y2)
xlabel(‘time (sec)’)
axis([0 1.0 0 3.5])
ylabel(‘currents [i1(t)&i2(t)] in amps’)
title(‘i1(t) & i2(t) vs t ‘)

The script fi le transient_2loops is executed, and the results and plots (Figures 2.106
through 2.108) are as follows:

>> transient _ 2loops
****************************************************
*******R E S U L T S*******************************
****************************************************
Solution of the two diff. loop equations for t>0
****************************************************
The currents i1(t) and i2(t), in amps are :
ans =
[ conj(-9/194*97^(1/2)*exp(-1/4*(23+97^(1/2))*t)+9/194*97^(1/2)*exp(1/4*(-
23+97^(1/2))*t)+3/2*exp(1/4*(-23+97^(1/2))*t)+3/2*exp(-1/4*(23+97^(1/2))*t))]
[ conj(exp(1/4*(-23+97^(1/2))*t)-14/97*97^(1/2)*exp(-1/4*(23+97^
(1/2))*t)+14/97*97^(1/2)*exp(1/4*(-23+97^(1/2))*t)+exp(-1/4*(23+97^(1/2))*t))]
*************************************************************
The simplify solution for i1(t) is:
ans =
-9/194*97^(1/2)*exp(-1/4*(23+97^(1/2))*t)+9/194*97^(1/2)*exp(1/4*(-23+97^
(1/2))*t)+3/2*exp(1/4*(-23+97^(1/2))*t)+3/2*exp(-1/4*(23+97^(1/2))*t)
**************************************************************************
The simplify solution for i2(t) is :
ans =
exp(1/4*(-23+97^(1/2))*t)-14/97*97^(1/2)*exp(-1/4*(23+97^(1/2))*t)+14/97*97^
(1/2)*exp(1/4*(-23+97^(1/2))*t)+exp(-1/4*(23+97^(1/2))*t)
**************************************************************************
The pretty solution for i1(t) is :
1/2 1/2


  • 9/194 97 exp(- 1/4 (23 + 97 ) t)
    1/2 1/2 1/2



  • 9/194 97 exp(1/4 (-23 + 97 ) t) + 3/2 exp(1/4 (-23 + 97 ) t)
    1/2

  • 3/2 exp(- 1/4 (23 + 97 ) t)

    The pretty solution for i2(t) is :
    1/2 1/2 1/2
    exp(1/4 (-23 + 97 ) t) - 14/97 exp(- 1/4 (23 + 97 ) t)
    1/2 1/2 1/2



  • 14/19 97 exp(1/4 (-23 + 97 ) t) + exp(- 1/4 (23 + 97 ) t)


Free download pdf