+ Reply to Thread
Results 1 to 4 of 4

Is there a VBA code to simplify (linear) algebraic expressions? (using text input)

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    52

    Is there a VBA code to simplify (linear) algebraic expressions? (using text input)

    As an example here's an input and desired output string:

    Please Login or Register  to view this content.
    This type of problem can be probably done easily using matrices. However it would take quite a while to actually make the code and I think someone probably have made such code already because this is quite a general problem. I think a large part of the problem would be simply to convert the text to matrices.

    Notes: In case existing programs don't deal with implicit multiplication or need the input to be in a slightly different format, I could just sort that out myself.

    I know that some software exists to solve these type of problems, but I can't find an easy way for excel and other software to communicate.
    Last edited by tahi.laci; 11-28-2015 at 08:46 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is there a VBA code to simplify (linear) algebraic expressions? (using text input)

    That's symbolic algebra, which Excel doesn't do. You could write code to do so in VBA (or any other language), but it would be reinventing the wheel; dozens exist.

    https://en.wikipedia.org/wiki/List_o...lgebra_systems
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-16-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Is there a VBA code to simplify (linear) algebraic expressions? (using text input)

    I have reffered to such software in the OP, but then the problem is that I can't automatically send the values to the CAS and return the result to excel. (not considering unreliable/slow methods like sendkeys)

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is there a VBA code to simplify (linear) algebraic expressions? (using text input)

    Simplifying (symbolic manipulation) and evaluating (substituting values for variables) are two different things.

    For the first, you might look to find if any of those packages has a COM interface.

    The second can be done with regular expressions, provided that the CAS can return expressions that Excel/VBA recognizes (e.g., no implicit multiplication), and agreement as to operator precedence (e.g., unary negation).
    Last edited by shg; 11-30-2015 at 12:59 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] text split(regular expressions)
    By chief_abound in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2015, 08:22 PM
  2. [SOLVED] AND expressions with text and numbers
    By CDandVinyl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-04-2015, 10:36 PM
  3. Help needed with expressions with substring expressions.
    By sbell1234 in forum Access Tables & Databases
    Replies: 7
    Last Post: 06-21-2015, 02:59 PM
  4. [SOLVED] Numerical expressions of multiply numbers embedded in text string
    By wraithu in forum Excel General
    Replies: 21
    Last Post: 09-28-2014, 02:19 PM
  5. [SOLVED] Linking two formulas for text conversions to numerical expressions
    By wraithu in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-26-2014, 03:56 PM
  6. [SOLVED] Inputbox to code for input text in cells.
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-07-2013, 12:24 PM
  7. Linear interpolation/extrapolation module - input?
    By DocM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2008, 09:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1