Hey there! So I just got started on TI programming this afternoon; since then, I've made a program that will graph any form of equation. It works quite nicely, as a matter of fact (I've attached a .8xp and you can see the code
HERE). I wanted to add something, though, and it doesn't seem to work that well:
[I'm using the slope-intercept part of the code as an example because it's the easiest]
:If Q=1
:Disp "y=Mx+B"
:Disp ""
:Prompt M,B
:"MX+B"→{Y1}
:B+5->Ymax:-B-5→Ymin
:{Y1}/M-B → Xmax:({Y1}/M-B)*-1→Xmin
The last line is what I'm referring to (the last two lines aren't in the .8xp or the Pastebin I linked). I'm trying to make it so that it automatically sets the window to something that'll fit the equation, and while the second-to-last line works perfectly, it seems that the calculator runs into problems using Y
1 as a variable. Just to test it, I tried 'calculating' Y
1 on its own, and, well...
...yeah. This was with Y
1 [in the Y= window] set to "6x+5".
So, two questions- first, why is Y
1 so astronomically high compared to what I put in? Second, how can I make it work with the equation? [because the equation needs a Y-value to work; the whole point of it is to solve for X]
I hope this made sense... thanks for taking time out to read it!
EDIT: Yep, that made no sense. BASICALLY what the last two lines in the code do is try to adjust the Ymin/max and Xmin/max values
according to the X and Y intercepts. The Y-intercept code [second-to-last line] works flawlessly, but the last line is having trouble.