|
Analyzing an expression?
This isn't related to FIRST, but is a matter of programming. I am trying to make a program that will take in information about multiple vectors and then take in an expression with both scalar and vector math and evaluate it. I was wondering what is the best approach for this. Lets say they have to enter in a string containing
(a,b,c,d,e,f)- letters representing vectors
(+,-,/,*,x) - operators
numbers and parenthesis
so like this (3a+4b)xc
what is the best way to evaluate the expression. The approach I am using uses like a million if statements and it is very hard to read =\ and slowwww. So, how does maple do it?
|