Sunday, April 1, 2012

FreeMat Lab

Introduction
       MatLab is one of the most popular application for numerical computations. MatLab is a computing language more powerful than traditional languages such as C, C++ or Fortran. In this exercise, we learn some of the commands used in the FreeMat program to solve equations for circuits. FreeMat used Matrix to do the computation.

Questions
            In this exercise, we want to find the current of R_3 of the following circuit:

V_1 = 15V
V_2 = 7V
R_1 = 20 Ω
R_2 = 5 Ω
R_3 = 10 Ω

The equation can be derived as follows:


After rearranging the equation 3 equations as follows are obtained:


Once the equation is rearranged, the FreeMat is used to do the calculation. The commands used are as follow:

The answers agree with the hint as the current through R_3 is predicted to be -0.186A and one of the current obtained is the -0.186A.

No comments:

Post a Comment