so i have an entry frame where i want to input an equation, and i need to turn the string into an actual equation in terms of x. so that i can plot it on a canvas.
i already know how to make the entry frame, and how to extract the string equation that was inputed.
the only problem i'm having is converting it into an actual equation.
e.g.
the string input is 'sin(x)'
and i want to turn it into sin(x)
x is defined by another entry frame which will indicate the number of steps between two boundaries.
say the boundary was [-10, 10]
and the number of steps was set to 40
therefore x will be equal to [-10:0.5:10]
so i was thinking that i should define the values for x first using a simple loop, and then convert 'sin(x)' into an equation.
everything is pretty easy besides the conversion.
any help is appreciated
thanks
phoenix1990
i already know how to make the entry frame, and how to extract the string equation that was inputed.
the only problem i'm having is converting it into an actual equation.
e.g.
the string input is 'sin(x)'
and i want to turn it into sin(x)
x is defined by another entry frame which will indicate the number of steps between two boundaries.
say the boundary was [-10, 10]
and the number of steps was set to 40
therefore x will be equal to [-10:0.5:10]
so i was thinking that i should define the values for x first using a simple loop, and then convert 'sin(x)' into an equation.
everything is pretty easy besides the conversion.
any help is appreciated
thanks
phoenix1990
Comment