Thursday, March 24, 2016

Please see blog here

I've decided to move my blog to WordPress. I've been having nothing but technical difficulties with Blogger. The night before the exam, I have to go mess with formatting because Blogger automatically reformats my blog when I open it. Editing is a frustrating exercise when it won't let me click on text, and indents follow my mouse cursor and wreak havoc on the media. WordPress is a little bit slow, but has no issues of this kind.

New blog URL

3/23/2016 FreeMat Assignments

Assignments

Starting out, we are given a circuit to solve using FreeMat using mesh analysis and matrices. The current running down the resistor between the meshes is the difference in current between the two meshes.


The answer given was I3 = -0.1857 A.

The next assignment deals with graphing and adding sinusoids. In this case, we work with a decay function. The legend is to better show which colored line belong to which function.

 
 

The next part of this assignment plots the addition of sinusoids. The red line is the sum of the other two.
 

Omega is changed to 10Hz:
 
 

FreeMat is capable of complex number arithmetic. The theoretical results are worked out in the comments in the script.
 
 The results match:
C =
  -1.0588 -  2.2353i
R_theory =
   -1.0588
I_theory =
   -2.2353
Here is a complex number matrix of a non-linear circuit. Conversion of polar takes an arc tangent of the imaginary and real parts (since imaginary here is mapped to the y-axis). A dot before multiplication or division of matrices make it an element-wise operation. The 360/(2*pi) converts it to degrees.

 Here are the results:
I =
   2.0588 +  2.9412i
   5.0000 -  3.5294i
I_polar =
   55.0080
  -35.2176 
 Finally, we find the roots of these polynomials: