Skip to content

sampersand/MathParsing

Repository files navigation

MathParsing

A java program that is used to parse strings into equations, and then solve them (among other things).

more info to come.

NOTE: The javadoc folder is exceedingly old, and will be updated in the future. ##How to run the code From the command line, type `java -cp bin -ea West.Math.Tester `. ##Arguments: NOTE: Double quotes are only required if there is spaces in the passed arguments.
This means `--e "y = 5 * cos(theta) + 4"` can be instead `--e y=5*cos(theta)+4`.

    ·--g - Use this argument exclusively on its own to open the Graphing Calculator Interface.
    ·--func - Any arguments after this will be defined as custom functions. NOTE: this is currently *not* working right now.
      Example: --func "summation:summation"
    ·--eq - Any arguments after this will be used as equations.
      Example: --eq "y = 5 × cos(theta) + 4" "theta = 5^pi"
    ·--indep - The next argument after this will be the independent variable. This will also open the graphing interface (with the independent variable as the "x axis variable")
      Example: --indep theta
    ·--dep - Any arguments after this will be dependent variables; They will be the values solved for / graphed.
      Example: --dep y1 y2
    ·--gtype - The next argument will dictate the Graph Type. Currently, the Graph Type defaults to Cartesian, and the only valid argument is "Polar".
      Example: --gtype Polar
    ·--step - A bit of a misnomer, the next argument is either a single number (Step), or three seperate numbers seperated by commas (Start, End, Step). This is only ever used when graphing, and is used to define how detailed the graph is & where the graph starts. Start and End are by default set to the window bound's min x and min y.
      Example: --step "-4·pi, 4×π/5, π÷16"
    ·--bounds - Only ever used for graphing, this defines the bounds of what will be displayed. The next argument should be 4 numbers, seperated by commas, in the format: Minimum X, Minimum Y, Maximum X, Maximum Y
      Example: --bounds "-2·π, -1, 2×pi, 1.0"
    ·--Prefix OR --prefix - Enables metric prefixing. "p" enables only commonly used ones, while "P" enables them all.
      Example: 4.61952289967403E-7 becomes 4.61952289967403μ.

About

Parsing strings into equations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages