Aes_Sedia5 wrote:
Does anyone have a good guide or ebook of Ti Basic tips and tricks and Loopholes and such. I already have the 1337 Guide to programming. Also please post the link to the guide or book. Thanks in advance!
83TRIXV2.TXT from here fits the bill perfectly, in my opinion.
Aes_Sedia5 wrote:
Does anyone have a good guide or ebook of Ti Basic tips and tricks and Loopholes and such. I already have the 1337 Guide to programming. Also please post the link to the guide or book. Thanks in advance!
Well, once my book is released, you'll want to get some of that. Manning has a program called MEAP (Manning Early-Access Program), so if when it's available for my book you sign up, you'll both be able to get the chapters as I write them, and the final book for cheaper, I think.
OK I am trying to make an enthalpy program. Basically the user would have any number of "items" to input into a list. For example 2H+2O = H2O. would be three items. H O and H2O. all different molecules. I am thinking each "Equatioin" would be its own list. So.
FInding Enthalpy for
6CO2+H2=O2+C+H2
Known
H2O =4H+2O Heat = 200
C+O2+CO2 Heat = 300
These values are not correct but you get the point.
THe lists would be as follows. L1="LOOKING FOR"{6,1,1,1,1}
L2=Equation 1 known
{1,4,2,200}
L3= NExt known equation
{1,1,1,300}
I am not sure what to do from there. OR If I am even close.
Or would it be better for each item to be its own list.
ALso how would I show what is on the right side of the equal sign in case I need to flip the equations.
Another program question I am making a program to graph a derivative of a function. Here is my idea.
Code:
Delvar B
SetupUpEditor L1,L2
0->dim(L1
0->dim(L2
Input "FUNCTION",Str1
Str->Equ(Str1.Y1
Input "INCREMENT OF DERIVATIVE",A
//This is just how many points you want plotted. If you want it every .25 points then input .25.
If A<.1
Then
.0001->H
Else
.001->H
End
Input "LEFT BOUND OF DOMAIN",X
Input "RIGHT BOUND OF DOMAIN",Y
//this is basically between which 2 points you want to graph. Not sure if this is needed just adding for maximum control.
For(B,X,Y,
B+A->B
B->1+dim(L1
Nderiv(Y1,X,B,H->L1(1+dim(L2
End
FnOn Y1
StatsOn L1,L2
Pause DispGraph
//Then 2derivative I am not sure how to do without finding the equation of L1,L2. Which I cant do without manual fit. So I could use some advice for that. and then of course 3 derivative.
Edit:
Chaned Upper and Lowerbound to Left and Right Bound.
Regarding the chemistry program: I'm not entirely clear what the question is there, but I'll do my best to answer. You can find the = sign with inString(), and use it with sub() to pluck out the part either before or after the equals sign. Are you asking if your methodology is correct, chemistry-wise, or if you have converted it into TI-BASIC properly?
To find the "derivative" of the function, you could, for example, find the point-wise derivative using nDeriv for a lot of X values, such as xmin through xmax stepping by deltaX, which would be 95 or so total values; a 95-value list is no big deal. You would then have two 95-element lists, X and Y, and you could Plot them.
For the chemistry problem. I was asking if I have it in Ti Basic properly.
For the second. That was what I was planning on doing. Is there any possible way to draw the line of the lists. Or would it have to be just the points.
Aes_Sedia5 wrote:
For the second. That was what I was planning on doing. Is there any possible way to draw the line of the lists. Or would it have to be just the points.
You would use the Plotn() command (for n=1, 2, or 3), like so:
Code: Plot1(xyLine,L1,L2,[mark])
This assumes that L1 and L2 have the same number of elements and hold your X and Y coordinates, respectively, so your first point is (L1(1), L2(1), your fifth is (L1(5),L2(5)), etc. The [mark] is one of the three symbols under [2nd][Y=][right].
Aes_Sedia5 wrote:
Sweet. Thanks KerrmM
Do you understand it? Did you test it out?
Sorry missed you post. I understand why it should work. However it does not work right now. I finally got out of my lull so I am working on this to finish it before December 1st. I am redoing some code now to see. My main problem is this line.
Code:
B->L1(1+dim(L1
I also tried
[code]
I think My order is wrong somewhere because that should work. B is a Floating Point Number. Which should not matter. Other than that everything else works up till that line.
What is the error it gives?
I fixed it, For some reason I typed it exactly the same (so i thought) and it worked. Oh well. It works fine now. Here is my current code
Code:
Delvar B
SetupUpEditor L1,L2
0->dim(L1
0->dim(L2
Input "FUNCTION",Str1
Str->Equ(Str1.Y1
Input "INCREMENT OF DERIVATIVE",A
//This is just how many points you want plotted. If you want it every .25 points then input .25.
If A<.1
Then
.0001->H
Else
.001->H
End
Input "LEFT BOUND OF DOMAIN",X
Input "RIGHT BOUND OF DOMAIN",Y
For(B,-1X,Y+1,
B+A->B
B->|LDER1X(1+dim(|LDER1X
Nderiv(Y1,X,B,H->|LDER1X(1+dim(|LDER1Y
End
//Here I would add 2 more For( loops for the 2nd And 3rd Derivatives.
FnOn Y1
StatsOn
Plot1(xyLine(|LDER1X,|LDER1Y,[dot]
//Here I would add the Plot2 and 3 for the second and third derivative.
DispGraph
I am just not sure how to call the |LDER1X and |LDER1Y to find the second and third derviatives. Is there a way to store a List as a Y var?
What does "|L" indicate? Also, you can't call lists, you only read and write them.
One of the TI-Basic editors for the computer use |L to talk about the lowercase List L (Correct me if I'm wrong, but I think it is TokensIDE). And I think, by "Call lists", he means what functions he should pass the lists to. Unfortunately, I don't know the answer, so I'll leave it to someone else :/
Yes the |L is the List "L". Also I am needing to find a way to take the points or the line that the lists made and re run that through the Nderiv Function. I just thought of a way.
Since the Xvalues should be the same can I just take the List of the Y values. For example
Code:
For(C,-1X,Y+1,
C+A->C
C->|LDER2X(1+dim(|LDER2X
Nderiv(LDER1X,X,B,H->|LDER2Y(1+dim(|LDER2Y
End
......Looking at it now, I don't think it would work, since there is no X in the lists. Hopefully you get the basic idea of what I need to do.
I understand what you need to do, and you're on the right track, but I'm not convinced that you do.
Since C is your iteration variable, namely your X value, you need to plug that into Nderiv() in the proper place. Also, For() supports For(variable,start,end,increment, so it should be For(C,Xstart,Xend,Xincrement).
OK I will do that. Thanks.
Code:
For(C,-1X,Y+1,A
C->|LDER2X(1+dim(|LDER2X
Nderiv(LDER1X,C,B,H->|LDER2Y(1+dim(|LDER2Y
End
IS that better? And also, More importantly would it work?
No, because you're not specifying the function to take the derivative of, which I assume is in L1. Can you step back and explain your code? I feel like you're just flailing around with attempts without really understanding the connection between the code and what you're trying to do, with no offense intended.
Better to take it slower and more methodically, which we can help you through.
Edit: And you're clearly not running your code, because that wouldn't even execute. It's important to code and test! If it doesn't run, then you know for a fact you're not doing it right.
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 like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum