Monday, March 10, 2014

FreeMat: Introduction to Numerical Computation

Solving Simultaneous Equations:

Assignment 1
To solve the system of equations derived from this circuit I used KCL and KVL. 
See the derivation and diagram below.


I created simple matrices with respect to current, voltage, and resistance in FreeMat to solve for the current across R_3.

Adding Sinusoids:
Assignment 1
1. Circuit A has a time constant of 100 ms, while circuit B  has a time constant of 200 ms. The circuit output is 2e^(-t/tau).
Circuit outputs generated by FreeMat were graphed for circuits A and B as the blue and green curves respectively.


From this graph it shows that circuit A reaches a lower output sooner.







2. If the circuit's output is related to 2(1-e(-t/tau)) the FreeMat generates the graph below.


In this case, circuit A-in blue-would also reach its maximum output sooner than circuit B.








Assignment 2

1. The output generated by the sum of two sinusoidal functions was found theoretically and through FreeMat. FreeMat also graphed the result of both methods to compare directly.
f1: blue
f2: green
F: red
This is the result of the theoretical function which matches exactly to that of the first method.




2. For a frequency of 10 Hz the process of plotting the graph was very similar except that the period is much shorter.

No comments:

Post a Comment