Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Thursday, July 2, 2015

3D Heart Surface in MATLAB


Matlab is pretty neat, I downloaded a trial version of Matlab to try it out. I came across on Mathworld something called Heart Equation and this 3D Heart Surface which looked pretty neat and cool and hence I tried it out in MATLAB.

Here's the code :-

Continue Reading →

Monday, June 15, 2015

Math Expression Parser in Java

Hello Everyone,

Today I am sharing a simple math expression parser that I made. This parser can parse and evaluate math expressions.

About the Parser
This parser supports many trigonometric functions and logarithmic and some general functions like exp, sqrt, abs etc. See the snapshots and everything will be clear. See the third screen shots for examples and their output

Description :

This parser is a simple math expression parser that parses and evaluates various mathematical functions.
Triginometric functions :  sin, cos, tan, arctan, arccos,arcsin, sec, cosec,cot
Logarithms :  ln is used for natural log, log10 is log base 10 and log2 is log base 2
Other functions : exp for exponentiation, abs for absolute value, sqrt for square root
Numbers like 45.3e-13 are also supported

This parser can also take functions of one variable like a math relation log10(x*sin(30*x)) with a variable x. Whenever such expressions are encountered you are asked to enter the value of x.

Please Note :

  1. Trigonometric functions work with radians and not degrees
  2. sin x is not valid but sin(x) or sin (x) is valid. Similarly its true for others too
  3. This parser also skips whitespaces and so it will work as long as parenthesis are in correct order

Type help, description, usage for assistence and exit to leave.

Usage : Type any mathematical expression with the functions stated above in the description example : sin(2*x)*cos(x)

 
Screenshots

[Image: mathparser1_zps115f779f.png]

[Image: mathparser2_zps03449d3d.png]

[Image: mathparser3_zpsddeb5dbb.png]
You must have Java 7. Open terminal and type :-

java -jar MathExpressionParser.jar

Note:- You must have set CLASSPATH and JAVA_HOME. If not then google for "how to set classpath in java".

Thank you,
Sincerely,
Psycho_Coder
Continue Reading →

Sunday, June 14, 2015

LaTeX Math Symbols

LaTeX is very important when you're writing your paper or creating a scientific presentation and you need to describe some math equations. LaTeX is a great way of symbolic representation of Mathematical equations.

In this post you will get a list of symbols which are used to write different equations.


Greek Letters


[Image: t1.gif]


Binary Operation Symbols


[Image: t2.gif]


Relation Symbols


[Image: t3.gif]


Punctuation Symbols


[Image: t4.gif]


Arrow Symbols


[Image: t5.gif]


Miscellaneous Symbols


[Image: t6.gif]


Variable-sized Symbols


[Image: t7.gif]


Log-like Symbols


[Image: t8.gif]


Delimiters


[Image: t9.gif]


Large Delimiters


[Image: t10.gif]


Math mode accents


[Image: t11.gif]


Some other constructions


[Image: t12.gif]
 
Article Taken from :- http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html

A PDF file which you can refer :- http://faculty.cbu.ca/srodney/ShortSymbInd.pdf



Continue Reading →

Follow Me!

Followers

Visitor Map