TI 83/84
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWARETI 83/84
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!

Download and Activate to enter!
Open source technologies have proven to be extremely advantageous to businesses.
This adaptive and highly efficient kind of software is central to the infrastructure of most companies. Since the world of open source technology is constantly changing,
IT professionals need a resource to give them up-to-the-minute information about these enterprise level and open source technologies. Dev Shed is that resource .
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today. .

Download to Enter | Contest Rules

Tutorials | Forums

Tutorials | Forums

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old December 11th, 2008, 02:35 PM
Easy Easy is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 4 Easy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m
Reputation Power: 0
Variable X

So I'm working on a program that does certain calculations that require "x" as a variable instead of a stored number.

How can I get the calculator to treat an "x" in something like:

(4x-2)^2

instead of whatever is stored for x?

Reply With Quote
  Trader Rating: 0 · #2  
Old December 11th, 2008, 03:50 PM
Airbard's Avatar
Airbard Airbard is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 7 Airbard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 13 m 53 sec
Reputation Power: 0
Use the solve( function under math, to use it solve(equation,variable,guess).

Reply With Quote
  Trader Rating: 0 · #3  
Old December 11th, 2008, 05:41 PM
Easy Easy is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 4 Easy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m
Reputation Power: 0
Quote:
Originally Posted by Airbard
Use the solve( function under math, to use it solve(equation,variable,guess).


I'm looking to use the derivative function, which is:

Code:
nDeriv(x²,x,2)
(The answer should be 4)


a.k.a

Code:
nDeriv(f(x),x,value of x)


Here's my code:

Code:
:ClrHome
:Output(3,5,"Finding")
:Output(4,7,"the")
:Output(5,4,"Derivative")
:Pause
:ClrHome
:Disp "f(x)?"
:Input A
:ClrHome
:Disp "X?"
:Input B
:ClrHome
:solve(nDeriv(A,x,B)→C
:Disp C
:End


I have highlighted the x variable in red, to show what needs to be a variable instead of a variable.

I'm getting syntax at the ")" after B and before the store arrow on line 7. What am I doing wrong?

Reply With Quote
  Trader Rating: 0 · #4  
Old December 11th, 2008, 06:32 PM
Airbard's Avatar
Airbard Airbard is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 7 Airbard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 13 m 53 sec
Reputation Power: 0
nDeriv( is used as an equation in the solve function, so that you still have to define the variable and the guess

Reply With Quote
  Trader Rating: 0 · #5  
Old December 11th, 2008, 07:58 PM
Easy Easy is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 4 Easy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m
Reputation Power: 0
So the variable would be X, and the guess would be...?

Reply With Quote
  Trader Rating: 0 · #6  
Old December 11th, 2008, 08:21 PM
Airbard's Avatar
Airbard Airbard is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 7 Airbard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 13 m 53 sec
Reputation Power: 0
the guess is what you think the answer is
I just realized that the nderiv( function gives a number so the solve( function uses a number as an equation so my suggestion is that you type out the formula for nderiv(
f'(x)=f(x+E)-f(x+E)/2E

Reply With Quote
  Trader Rating: 0 · #7  
Old December 11th, 2008, 08:29 PM
Easy Easy is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 4 Easy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m
Reputation Power: 0
But the catch is that I'm trying to make this be able to work for any equation, like f(x)=sin(x) @ x=π/2

Sorry for seeming stubborn, but I'm a little noobish/rusty when it comes to stuff like this.

Reply With Quote
  Trader Rating: 0 · #8  
Old December 11th, 2008, 08:35 PM
Airbard's Avatar
Airbard Airbard is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 7 Airbard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 13 m 53 sec
Reputation Power: 0
then try using this:
Quote:
:input "EQUATION-"A
:input "GUESS="B
:solve(A,X,B)

where A is an equation
and B is the guess
removing the nderiv( allows any equation to be used

Reply With Quote
  Trader Rating: 0 · #9  
Old April 1st, 2009, 10:28 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Mufinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 330 MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Days 3 h 29 m 28 sec
Reputation Power: 113
Quote:
Originally Posted by Airbard
then try using this:

where A is an equation
and B is the guess
removing the nderiv( allows any equation to be used

No, that won't work
A will be stored as a value still. If you put (X+1)^2 in as A, then it would use the value of X it already has, solve it, and then store that as A
You'd have to store it as a String
Code:
:input "EQUATION-",Str1
:input "GUESS=",B
:solve(Str1,X,B)

This may work, but I don't know, because i have never used solve before. Anyways if you don't know already, you access your list of Strings by pressing [VARS], [7], and then choose which of then 10 you want. Here I used number 1.

Reply With Quote
  Trader Rating: 0 · #10  
Old April 16th, 2009, 08:54 PM
gumbee's Avatar
gumbee gumbee is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 29 gumbee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 18 sec
Reputation Power: 0
Send a message via MSN to gumbee Send a message via Google Talk to gumbee
Quote:
Originally Posted by MufinMcFlufin
No, that won't work
You'd have to store it as a String
Code:
:input "EQUATION-",Str1
:input "GUESS=",B
:solve(Str1,X,B)


Code:
:input "equation ",str1
:input "guess ",B
:solve(string>Equ(str1),X,B)->C

You have to convert the string to an equation first otherwise the calc gives you a nifty little error.

Reply With Quote
  Trader Rating: 0 · #11  
Old April 21st, 2009, 09:20 AM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Mufinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 330 MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Days 3 h 29 m 28 sec
Reputation Power: 113
Quote:
Originally Posted by gumbee
Code:
:input "equation ",str1
:input "guess ",B
:solve(string>Equ(str1),X,B)->C

You have to convert the string to an equation first otherwise the calc gives you a nifty little error.

So I'm not the only one who thinks that errors are nifty...
Anyways, I've never actualy done anthing like this, so after looking over my code again before reading yours, I thought something looked wrong, but I never tested it so I just went with it. Does it work now you added that little part?

Reply With Quote
  Trader Rating: 0 · #12  
Old April 23rd, 2009, 12:34 AM
gumbee's Avatar
gumbee gumbee is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 29 gumbee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 18 sec
Reputation Power: 0
Send a message via MSN to gumbee Send a message via Google Talk to gumbee
no, i had to change some stuff. here's the new code. this is tested and works... well...no errors at least.
Code:
:input "equation ",str1
:input "guess ",B
:string>Equ(str1,Y1)
:solve(Y1,X,A)->C

Y1 is a function variable that can be found buy pushing [VARS] > [->] > [ENTER] > [ENTER]

Last edited by gumbee : April 23rd, 2009 at 12:36 AM. Reason: parentheses mix-up/colors

Reply With Quote
  Trader Rating: 0 · #13  
Old April 24th, 2009, 08:27 PM
legoguy314 legoguy314 is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 38 legoguy314 User rank is Sergeant Major (2000 - 5000 Reputation Level)legoguy314 User rank is Sergeant Major (2000 - 5000 Reputation Level)legoguy314 User rank is Sergeant Major (2000 - 5000 Reputation Level)legoguy314 User rank is Sergeant Major (2000 - 5000 Reputation Level)legoguy314 User rank is Sergeant Major (2000 - 5000 Reputation Level)legoguy314 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 h 4 m 14 sec
Reputation Power: 30
I typicaaly input a string, change it to a Y= and store it as Y1 then use seg(Y1,X,X,X) Seq is under list. That mught not be right right but its close, i don't have my calc. with me now so I apologize if that is incorrect

Reply With Quote
  Trader Rating: 0 · #14  
Old April 24th, 2009, 08:47 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Mufinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 330 MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Days 3 h 29 m 28 sec
Reputation Power: 113
Quote:
Originally Posted by gumbee
no, i had to change some stuff. here's the new code. this is tested and works... well...no errors at least.
Code:
:input "equation ",str1
:input "guess ",B
:string>Equ(str1,Y1)
:solve(Y1,X,A)->C

Y1 is a function variable that can be found buy pushing [VARS] > [->] > [ENTER] > [ENTER]

Hold on there, you had it input variable B, but then in the solve code, you used variable A. Was that a typo, or did you intentionally do it? And if so, then why?

Reply With Quote
  Trader Rating: 0 · #15  
Old April 25th, 2009, 03:03 AM
gumbee's Avatar
gumbee gumbee is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 29 gumbee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 18 sec
Reputation Power: 0
Send a message via MSN to gumbee Send a message via Google Talk to gumbee
Just a typo. Haha.

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWARETI 83/84 > Variable X


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
     
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap
LOADING INFUSIONSOFTLOADING INFUSIONSOFT 1debug:overlay status: OFF
overlay not displayed overlay cookie defined: TI_CAMPAIGN_1012_D OVERLAY COOKIE set:
status off