Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: joao9856 on April 02, 2013, 05:57:24 pm

Title: General help
Post by: joao9856 on April 02, 2013, 05:57:24 pm
I'd like to know if the following is possible possible:
- making a graph function without the actual graphic
- And then if that is possible can i get that graph zeros
Title: Re: General help
Post by: Dapianokid on April 02, 2013, 07:18:29 pm
joao, do you mean using Basic to display a linear cartesian representation of an equation?
In that case, yes it is possible but it would be slow, and impractical.
Title: Re: General help
Post by: Hooloovoo on April 02, 2013, 09:24:52 pm
Do you mean like storing y1=x^2-1 from a program? Yes, you can use strings. so "x^2-1"->str1:dispgraph would show the graph. If you do not want to show the graph, you can just do solve(y1,x,1). solve( is under [math] and has the syntax solve(equation,variable,guess).
Title: Re: General help
Post by: Dapianokid on April 02, 2013, 09:29:05 pm
Do you mean like storing y1=x^2-1 from a program? Yes, you can use strings. so "x^2-1"->str1:dispgraph would show the graph. If you do not want to show the graph, you can just do solve(y1,x,1). solve( is under [math] and has the syntax solve(equation,variable,guess).

This is a better answer to your question.
I need to anticipate the experience levels of newbs..
Title: Re: General help
Post by: joao9856 on April 03, 2013, 04:30:15 am
Sorry i forgot to say i'm using a Ti-Nspire, and i don't think that that one calc as dispgraph
Title: Re: General help
Post by: Hooloovoo on April 03, 2013, 12:54:35 pm
Ah, I see. You cannot display data to the screen while the program is running. You cannot directly assign an equation to f1, for example, but you can set f1=myfunc, and in the program set x^2-1-> myfunc. However, you cannot then access f1. If you just want to find the zeros, then the solve( for CAS or the nsolve( for non-CAS is what you are looking for.
Title: Re: General help
Post by: Dapianokid on April 03, 2013, 01:14:54 pm
I suggest using jacobly's emu for programming using your Nspire. Because Nspire basic is pretty much nonsense.
Title: Re: General help
Post by: ElementCoder on April 03, 2013, 01:27:28 pm
If finding zeroes is your only goal then you can just do "nSolve(x^2+3x+4 = 0, x)" for example (without the quotes). If you want to be able to enter arbitrary values as well do the following (assuming you are on a touchpad / CX):
Go to doc>Insert>Program Editor>New, enter a name and select "Function" as the type. Press ok, you will see the following:
Code: [Select]
Func name()=

EndFunc
Now change it to the following (replacing the equation with whatever your function is):
Code: [Select]
Func name(x)=
x^2+3x
EndFunc
You can also add more variables to it, but that will unable you to plot it. To use it you simply call name(3) for example. To solve for zeroes use "nSolve(name(x)10, x)" on non-CAS or "solve(name(x)=0,x)" on CAS.
Title: Re: General help
Post by: DJ Omnimaga on April 03, 2013, 03:15:13 pm
I suggest using jacobly's emu for programming using your Nspire. Because Nspire basic is pretty much nonsense.
Well he would need to keep in mind that in 84+ mode he can't send/receive programs so that can be a problem. Also there might still be bugs.

But yeah for non-math stuff Nspire BASIC isn't very reliable. You might be fine for school material, but if you ever go further, it might be best to use Lua (there are some on-calc tools)
Title: Re: General help
Post by: Deep Toaster on April 03, 2013, 11:32:00 pm
I suggest using jacobly's emu for programming using your Nspire. Because Nspire basic is pretty much nonsense.
TI-Nspire BASIC is actually extremely well-adapted for math purposes (which the poster is asking about), because that's exactly what it was designed for.

The only reason many people don't like it is because it's nearly impossible to make a decent game with it. Because that's like trying to make a graphical game with Mathematica or doing your calculus homework on a game console. That's the same reason you wouldn't make a calculation-heavy math program with Lua.

Sorry that this is off-topic, but I feel too many people just assume that certain features of the TI-Nspire are intrinsically awful without thinking about what they're meant to do.
Title: Re: General help
Post by: Spyro543 on April 04, 2013, 06:51:38 am
I've had some major troubles writing even math programs with the Nspire's basic. I was almost always able to make the program in question work on my Casio calc, or even my PIC18F46K20 processor. Maybe I just don't know enough about the Nspires...?
Title: Re: General help
Post by: Dapianokid on April 04, 2013, 10:09:21 am
I suggest using jacobly's emu for programming using your Nspire. Because Nspire basic is pretty much nonsense.
TI-Nspire BASIC is actually extremely well-adapted for math purposes (which the poster is asking about), because that's exactly what it was designed for.

The only reason many people don't like it is because it's nearly impossible to make a decent game with it. Because that's like trying to make a graphical game with Mathematica or doing your calculus homework on a game console. That's the same reason you wouldn't make a calculation-heavy math program with Lua.

Sorry that this is off-topic, but I feel too many people just assume that certain features of the TI-Nspire are intrinsically awful without thinking about what they're meant to do.

Sorry. :P I have looked at the language, but I don't have my Nspire juuuust yet....
Title: Re: General help
Post by: aeTIos on April 09, 2013, 10:07:48 am
I suggest using jacobly's emu for programming using your Nspire. Because Nspire basic is pretty much nonsense.
TI-Nspire BASIC is actually extremely well-adapted for math purposes (which the poster is asking about), because that's exactly what it was designed for.

The only reason many people don't like it is because it's nearly impossible to make a decent game with it. Because that's like trying to make a graphical game with Mathematica or doing your calculus homework on a game console. That's the same reason you wouldn't make a calculation-heavy math program with Lua.

Sorry that this is off-topic, but I feel too many people just assume that certain features of the TI-Nspire are intrinsically awful without thinking about what they're meant to do.
Exactly my thoughts, Deep :D Nspire basic is extremely useful if you do math. (only problem being PTT mode blocking libs <_<)