The purpose of this activity is to become more familiar with using MATLAB / FreeMAT for the purposes of this class' activities and problems. Simple math functions, matrices, and more complex linear equations were explored and solved in this experiment using FreeMAT.
Procedure:
The "Using FreeMAT as a Calculator" and "Redoing Errors" sections were completed in the above screenshot. The reason why sin(90) does not equal to 0 and sin(6.28) is negative in MATLAB is because MATLAB uses a radians mode, not a degree mode. 90 and 6.28 in MATLAB are processed as in radians even through the user wants them to be processed as in degrees.
"Assigning Expressions to Variables", "Creating an Array", "Automatically Creating Vectors" and "Transposing Arrays" section exercises were performed in the above screenshot.
"Applying Functions to Row Vectors" and "Array Operations" were completed in the above screenshots. As for the results, all of them made sense and no errors were received when the correct operations were used.
The exercises of "Addressing Arrays" and "Creating Simple Plots" sections were completed in the above two screenshots.
The above three pictures show completion of the exercise, in order, for "Adding Additional Plots to the Same Graph" section.
Exercise 1 of "Script Files" was completed in the above screenshot.
Above is the solution for Assignment 1 of "Solving Simultaneous Equations". It was found that the current through R3 is -0.1857 A.
Assignment 1 number 1 of "Plotting Exponentials" was completed in the above screenshot. It was found that as the time constant increases, the exponential curve changes less. For example, Circuit B, which has the largest time constant, corresponds to the green graph. Therefore, Circuit A will have the lowest output sooner.
This screenshot corresponds to number 2 of Assignment 1 of "Plotting Exponentials". Circuit A is represented by the blue graph, and circuit B is represented by the green graph.
Part 1 of Assignment 2 in the "Adding Sinusoids" section was answered in the screenshot above. It is seen that the actual output by FreeMAT is not equal to the theoretical output because FreeMAT read the phase angles in radians, and not in the desired degrees as the theoretical output did.
Part 2 of Assignment 2 for "Adding Sinusoids" is answered above.
Exercise 1a of "Complex Numbers" (there are two exercises marked as exercise 1 in this section).
Exercise 1b and 2 of "Complex Numbers".
Assignment 1 of "Complex Numbers"
Assignment 2 of "Complex Numbers"
Assignment 3 of "Complex Numbers"
Assignment 4 of "Complex Numbers"
Exercise 1 and Assignments 1 and 2 of "Solving for Roots of Equations"
Conclusion:
In this activity I learned simple math functions in FreeMAT, along with the basic use of the syntax of this program. I also learned how to make matrices in FreeMAT and how to add, multiply and transpose them. I also learned some basic formatting, writing functions in terms of variables and graphing those functions, even multiple functions on one graph. I also learned how to isolate parts of a matrix into its own array, and how to write script files and use them in FreeMAT. I learned how to solve circuit problems using matrices and how to work with complex numbers in FreeMAT. I learned how to convert from rectangular to polar coordinates and lastly how to solve LaPlace transforms by finding the roots of equations.
I can now say that I do know the basics of MATLAB that will be used for this class, and that MATLAB was not as difficult as I thought it would be, based on the experience with this activity.
No comments:
Post a Comment