Results 1 to 5 of 5

Thread: Equations..

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    21

    Question Equations..

    I have a problem for which I hope there is a simple fix...

    I have created a program that allows teachers/students to graph and print many different types of equations and functions that one would find in a typical HS math course...I have created interfaces for many different types of graphs such as polynomial functions, exponential functions, polar equations...etc.
    What I want to do now is allow users to input the right hand side of an equation and have the program graph it for them...just like a typical graphing calculator. My question is how to read a string of numbers, operations, variables and grouping symbols from a textbox...Will I have to parse out every character and treat it separately or is there a simpler solution.
    Ex: I want them to type in something like: 2x^4+3x(2x-5)/12

    Thanks!!! Mike

  2. #2
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Equations..

    This is one of those instances where parsing out everything one by one may be easier since there's little in the way of patterns you'd be able to pick out.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    21

    Re: Equations..

    Thanks...I had a feeling that was what I would need to do....I always wondered how TI did that on the graphing calculators...I was hoping for an easier way!!!

  4. #4
    Frenzied Member Campion's Avatar
    Join Date
    Jul 2007
    Location
    UT
    Posts
    1,098

    Re: Equations..

    Here's an algorithm to help you understand how this can be accomplished:

    http://en.wikipedia.org/wiki/Shunting_yard_algorithm
    From my burrow, 2 feet under.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    21

    Re: Equations..

    Thanks!!! This is helpful...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width