Monday, February 29, 2016

MathLabTutorial 02/28/2016

Introduction to Numerical Computation with FreeMat
Below are all the works-practice, exercise, and assignments
Exercise 1 page, using FreeMat as a calculator





Create a row vector, starting from 0 to 10; 0.5 increment





CC= cos(x)*sin(x) gave error because 1*21 marix multiply 1*21 does not make sense, it should be (1*21)x(21*1). For the DD=cos(x).*sin(x),  it just each x from each matrix multiply together, which makes sense


Plotting

Used Hold command and I added one more graph

hold off and replot the graph

If we plot sinx and cosx as x and y, we get a circle, much as we expect as polar coordinate




solving for system of equation by finding inverse matrix




complex number practice






script to convert  from rectangular to polar coordinate








II. Finding roots and finding Laplace transform
By finding the root,  I now could factor out the denominator. 

I performed fraction decomposition manually and was able to use the table to find the inverse Laplace transform


III. Summary:
Overall, I found it not really hard to do. Just a few comments, sometimes, the tutorial came short so I had to look up some information online, such as when I wanted to print the polar coordinate, I had to look up sprintf. Secondly, I think that Matlab is easier than Java/C++ when it comes to Math, for these program, it would have cost me much greater time to finish with Java.

No comments:

Post a Comment