This is an archived, readonly copy of the UnitedTI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's
TIBASIC subforum. Some of these topics may also be directlylinked to active Cemetech topics. If you are a Cemetech member with a linked UnitedTI account, you can link UnitedTI topics here with your current Cemetech topics.
TIBasic =>
TIBASIC
Author 
Message 

justme2.0
Newbie
Joined: 13 Oct 2009 Posts: 5

Posted: 13 Oct 2009 12:38:59 am Post subject: 


I am relatively new to programming. I am using a Ti84+ silver. I am looking for a way to manipulate a user inputted equation. Take for instance the equation (5x+1. I would like to be able to have the user input the equation (or any equation) and then multiply/distribute through by a number; say 5. So, 5(5x+1=(25x+90). I would then like to display the final equation (25x+90) on the screen.
I have tried to input the equation as a string and as a "y=" equation. Then i have tried to multiply the equation by a number. The calculator returns a number rather than an expression containing x. I must be evaluating x as some value. I would like to find a way to display the result as an equation.
Any Ideas? Thanks.
Last edited by Guest on 13 Oct 2009 12:39:52 am; edited 1 time in total 

Back to top 


Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976

Posted: 13 Oct 2009 03:27:04 am Post subject: 


Welcome to UnitedTI :)
One easy way is to have the user input an expression for Y1 and then run a regression on it for the expanded form.
Another modest approach:
ClrHome
Disp "A(Bx+C)","
Prompt A,B,C
ClrHome
Disp "Dx+E","
Disp "D=","E=
Output(3,3,AB
Output(4,3,AC
...but I assume that you're looking for something a little less rigid. To be honest, it's a real challenge: what if the user types in (5*v+1*5? Unless the program is designed to be as flexible as the input, it must call upon the user to follow a certain format. Just to start out, try looking for a number that is outside of the parentheses. The main tools when working with strings are sub(, inString(, and length( – you can find links to those in the command index of TIBD.
Last edited by Guest on 05 Jul 2010 07:55:16 am; edited 1 time in total 

Back to top 


IAmACalculator In a state of quasihiatus
KnowItAll
Joined: 21 Oct 2005 Posts: 1571

Posted: 13 Oct 2009 06:56:25 am Post subject: 


If this is really important, then you may want to consider upgrading to a TI89 series calculator. Those come builtin with the ability to manipulate variables in exactly the way you've described. If upgrading is not an option, you could consider looking at programs such as Symbolic that can give limited functionality. 

Back to top 


brandonw
Advanced Member
Joined: 12 Jan 2007 Posts: 455

Posted: 13 Oct 2009 09:54:57 am Post subject: 


To reiterate, what you're talking about is symbolic manipulation, and the 84+SE just doesn't have support for that (excepting Symbolic). The TI89 and up are the calculators to use for such a thing, or you'll have to reimplement all that string parsing yourself (in 83+ BASIC no less), which is not fun. 

Back to top 


justme2.0
Newbie
Joined: 13 Oct 2009 Posts: 5

Posted: 13 Oct 2009 12:27:40 pm Post subject: 


Hmmm yeah i figured it might be quite difficult. Thanks for the ideas I'll certainly give them a try.
I have another question. What if i wanted simply to display an equation. For instance if I had the user input a number as A, say 5→A, and then wanted to display the simple equation "Ax" which would be 5x. Whenever i try to display x as a variable the calculator will evaluate x as some number and produce a numerical result. Is there any way to display "Ax"=5x? 

Back to top 


allemensen
Newbie
Joined: 21 Jul 2009 Posts: 20

Posted: 13 Oct 2009 04:24:10 pm Post subject: 


You can display A as number using output. Then you can cslculate the number of digits in A usin log(A)+1. (If A is a whole number)
Thrn you can display the string "X" for your X 

Back to top 


justme2.0
Newbie
Joined: 13 Oct 2009 Posts: 5

Posted: 13 Oct 2009 11:10:54 pm Post subject: 


Thanks to all. I figured out a way to do what i want to accomplish 

Back to top 



Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with likeminded coders and tech and calculator enthusiasts via the sitewide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page