using the eval function in the TI-Nspire math librarySQLite Lua Libraryis it possible to call lua functions defined in other lua scripts in redis?Check type of variable within Ti-Nspire functionPassing equation to TI -Nspire CX as parameter?TI Nspire: Return a list in a functionLua Ti-nspire platform.window:invalidate()Constant in function of other constants - TI-Nspire CASderivate of a two variable function on one point ti-nspireHow to evaluate a function inside a written function on the TI-nspire CX cas?Ti nspire programming - definition of variables
Gaining Proficiency in Vehicles (water)
What kind of Chinook helicopter/airplane hybrid is this?
Who goes first? Person disembarking bus or the bicycle?
Other Space Shuttle O-ring failures
Tesco's Burger Relish Best Before End date number
Wires do not connect in Circuitikz
Appropriate conduit for several data cables underground over 300' run
Need a non-volatile memory IC with near unlimited read/write operations capability
Draw a diagram with rectangles
When do flights get cancelled due to fog?
What is the meaning of "prairie-dog" in this sentence?
Intern not wearing safety equipment; how could I have handled this differently?
How should I ask for a "pint" in countries that use metric?
What was the profession 芸者 (female entertainer) called in Russia?
Can Jimmy hang on his rope?
What was the significance of Spider-Man: Far From Home being an MCU Phase 3 film instead of a Phase 4 film?
Deck of Cards with Shuffle and Sort functionality
Computer name naming convention for security
Gory anime with pink haired girl escaping an asylum
How do I talk to my wife about unrealistic expectations?
Can a landlord force all residents to use the landlord's in-house debit card accounts?
Why do airports remove/realign runways?
What does "spinning upon the shoals" mean?
QR codes, do people use them?
using the eval function in the TI-Nspire math library
SQLite Lua Libraryis it possible to call lua functions defined in other lua scripts in redis?Check type of variable within Ti-Nspire functionPassing equation to TI -Nspire CX as parameter?TI Nspire: Return a list in a functionLua Ti-nspire platform.window:invalidate()Constant in function of other constants - TI-Nspire CASderivate of a two variable function on one point ti-nspireHow to evaluate a function inside a written function on the TI-nspire CX cas?Ti nspire programming - definition of variables
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to understand how to use the TI-Nspire CAS system through Lua. I am trying to emulate thesolve(x+5/3,x)
functionality found in the TI-Nspire CX CAS gui.
I looked through the API Docs found here : https://education.ti.com/download/en/ed-tech/59108CCE54484B76AF68879C217D47B2/7EFB09CED41C4190AFF8F60283B6727A/TI-NspireLuaScriptingAPIReferenceGuide.pdf
I believe what I am looking for is the eval
function on page 51 although I can't find much online to sample from. The examples provided are not concrete ones.
math.eval(math_expression) --apilevel = 2.0
math.eval(math_expression, [exact]) --apilevel = 1.0
local expr = "f1("..mx")"
return math.eval(expr)
Iv'e tried
require "math"
local answer
answer = math.eval("f1(x+3/4,x)")
answer = math.eval(x+3/4,x)
answer = math.eval("5+9")
I keep getting the error "cannot execute during initialization."
1) How do you fix the error
2) May I have some concrete examples of using the function
lua ti-nspire
add a comment |
I am trying to understand how to use the TI-Nspire CAS system through Lua. I am trying to emulate thesolve(x+5/3,x)
functionality found in the TI-Nspire CX CAS gui.
I looked through the API Docs found here : https://education.ti.com/download/en/ed-tech/59108CCE54484B76AF68879C217D47B2/7EFB09CED41C4190AFF8F60283B6727A/TI-NspireLuaScriptingAPIReferenceGuide.pdf
I believe what I am looking for is the eval
function on page 51 although I can't find much online to sample from. The examples provided are not concrete ones.
math.eval(math_expression) --apilevel = 2.0
math.eval(math_expression, [exact]) --apilevel = 1.0
local expr = "f1("..mx")"
return math.eval(expr)
Iv'e tried
require "math"
local answer
answer = math.eval("f1(x+3/4,x)")
answer = math.eval(x+3/4,x)
answer = math.eval("5+9")
I keep getting the error "cannot execute during initialization."
1) How do you fix the error
2) May I have some concrete examples of using the function
lua ti-nspire
I think @Piglet has the answer - but when testing - use the simplest example possible. That is useanswer = math.eval("5+9")
. Also don't expect too much. The Lua API is ... well ... not exactly rich in the "working with expressions" department.
– soegaard
Mar 25 at 13:15
add a comment |
I am trying to understand how to use the TI-Nspire CAS system through Lua. I am trying to emulate thesolve(x+5/3,x)
functionality found in the TI-Nspire CX CAS gui.
I looked through the API Docs found here : https://education.ti.com/download/en/ed-tech/59108CCE54484B76AF68879C217D47B2/7EFB09CED41C4190AFF8F60283B6727A/TI-NspireLuaScriptingAPIReferenceGuide.pdf
I believe what I am looking for is the eval
function on page 51 although I can't find much online to sample from. The examples provided are not concrete ones.
math.eval(math_expression) --apilevel = 2.0
math.eval(math_expression, [exact]) --apilevel = 1.0
local expr = "f1("..mx")"
return math.eval(expr)
Iv'e tried
require "math"
local answer
answer = math.eval("f1(x+3/4,x)")
answer = math.eval(x+3/4,x)
answer = math.eval("5+9")
I keep getting the error "cannot execute during initialization."
1) How do you fix the error
2) May I have some concrete examples of using the function
lua ti-nspire
I am trying to understand how to use the TI-Nspire CAS system through Lua. I am trying to emulate thesolve(x+5/3,x)
functionality found in the TI-Nspire CX CAS gui.
I looked through the API Docs found here : https://education.ti.com/download/en/ed-tech/59108CCE54484B76AF68879C217D47B2/7EFB09CED41C4190AFF8F60283B6727A/TI-NspireLuaScriptingAPIReferenceGuide.pdf
I believe what I am looking for is the eval
function on page 51 although I can't find much online to sample from. The examples provided are not concrete ones.
math.eval(math_expression) --apilevel = 2.0
math.eval(math_expression, [exact]) --apilevel = 1.0
local expr = "f1("..mx")"
return math.eval(expr)
Iv'e tried
require "math"
local answer
answer = math.eval("f1(x+3/4,x)")
answer = math.eval(x+3/4,x)
answer = math.eval("5+9")
I keep getting the error "cannot execute during initialization."
1) How do you fix the error
2) May I have some concrete examples of using the function
lua ti-nspire
lua ti-nspire
edited Mar 25 at 22:24
Piglet
8,9732 gold badges11 silver badges23 bronze badges
8,9732 gold badges11 silver badges23 bronze badges
asked Mar 25 at 6:48
Max NovaMax Nova
166 bronze badges
166 bronze badges
I think @Piglet has the answer - but when testing - use the simplest example possible. That is useanswer = math.eval("5+9")
. Also don't expect too much. The Lua API is ... well ... not exactly rich in the "working with expressions" department.
– soegaard
Mar 25 at 13:15
add a comment |
I think @Piglet has the answer - but when testing - use the simplest example possible. That is useanswer = math.eval("5+9")
. Also don't expect too much. The Lua API is ... well ... not exactly rich in the "working with expressions" department.
– soegaard
Mar 25 at 13:15
I think @Piglet has the answer - but when testing - use the simplest example possible. That is use
answer = math.eval("5+9")
. Also don't expect too much. The Lua API is ... well ... not exactly rich in the "working with expressions" department.– soegaard
Mar 25 at 13:15
I think @Piglet has the answer - but when testing - use the simplest example possible. That is use
answer = math.eval("5+9")
. Also don't expect too much. The Lua API is ... well ... not exactly rich in the "working with expressions" department.– soegaard
Mar 25 at 13:15
add a comment |
2 Answers
2
active
oldest
votes
From the TI-Nspire Lua Scripting API Reference Manual 12.1 math.eval:
Warning
math.eval is not available during script initialization
To avoid this error do not call the function befor script is initialized.
What does it mean to initialize the script and how do you do that?
– Max Nova
Mar 26 at 9:14
@MaxNova I don't know. I could not find anything in the manual. I guess you have to run some other function first. As TI-Nspire is a commercial product I suggest you ask their support for help. TI's support is usually very good.
– Piglet
Mar 26 at 9:33
add a comment |
This works!
function on.paint(gc)
local var1
var1 = math.eval("nsolve(x+4=8,x)")
gc:drawString(var1, 2, 20)
end
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55332497%2fusing-the-eval-function-in-the-ti-nspire-math-library%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
From the TI-Nspire Lua Scripting API Reference Manual 12.1 math.eval:
Warning
math.eval is not available during script initialization
To avoid this error do not call the function befor script is initialized.
What does it mean to initialize the script and how do you do that?
– Max Nova
Mar 26 at 9:14
@MaxNova I don't know. I could not find anything in the manual. I guess you have to run some other function first. As TI-Nspire is a commercial product I suggest you ask their support for help. TI's support is usually very good.
– Piglet
Mar 26 at 9:33
add a comment |
From the TI-Nspire Lua Scripting API Reference Manual 12.1 math.eval:
Warning
math.eval is not available during script initialization
To avoid this error do not call the function befor script is initialized.
What does it mean to initialize the script and how do you do that?
– Max Nova
Mar 26 at 9:14
@MaxNova I don't know. I could not find anything in the manual. I guess you have to run some other function first. As TI-Nspire is a commercial product I suggest you ask their support for help. TI's support is usually very good.
– Piglet
Mar 26 at 9:33
add a comment |
From the TI-Nspire Lua Scripting API Reference Manual 12.1 math.eval:
Warning
math.eval is not available during script initialization
To avoid this error do not call the function befor script is initialized.
From the TI-Nspire Lua Scripting API Reference Manual 12.1 math.eval:
Warning
math.eval is not available during script initialization
To avoid this error do not call the function befor script is initialized.
answered Mar 25 at 8:24
PigletPiglet
8,9732 gold badges11 silver badges23 bronze badges
8,9732 gold badges11 silver badges23 bronze badges
What does it mean to initialize the script and how do you do that?
– Max Nova
Mar 26 at 9:14
@MaxNova I don't know. I could not find anything in the manual. I guess you have to run some other function first. As TI-Nspire is a commercial product I suggest you ask their support for help. TI's support is usually very good.
– Piglet
Mar 26 at 9:33
add a comment |
What does it mean to initialize the script and how do you do that?
– Max Nova
Mar 26 at 9:14
@MaxNova I don't know. I could not find anything in the manual. I guess you have to run some other function first. As TI-Nspire is a commercial product I suggest you ask their support for help. TI's support is usually very good.
– Piglet
Mar 26 at 9:33
What does it mean to initialize the script and how do you do that?
– Max Nova
Mar 26 at 9:14
What does it mean to initialize the script and how do you do that?
– Max Nova
Mar 26 at 9:14
@MaxNova I don't know. I could not find anything in the manual. I guess you have to run some other function first. As TI-Nspire is a commercial product I suggest you ask their support for help. TI's support is usually very good.
– Piglet
Mar 26 at 9:33
@MaxNova I don't know. I could not find anything in the manual. I guess you have to run some other function first. As TI-Nspire is a commercial product I suggest you ask their support for help. TI's support is usually very good.
– Piglet
Mar 26 at 9:33
add a comment |
This works!
function on.paint(gc)
local var1
var1 = math.eval("nsolve(x+4=8,x)")
gc:drawString(var1, 2, 20)
end
add a comment |
This works!
function on.paint(gc)
local var1
var1 = math.eval("nsolve(x+4=8,x)")
gc:drawString(var1, 2, 20)
end
add a comment |
This works!
function on.paint(gc)
local var1
var1 = math.eval("nsolve(x+4=8,x)")
gc:drawString(var1, 2, 20)
end
This works!
function on.paint(gc)
local var1
var1 = math.eval("nsolve(x+4=8,x)")
gc:drawString(var1, 2, 20)
end
answered Apr 3 at 3:07
Max NovaMax Nova
166 bronze badges
166 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55332497%2fusing-the-eval-function-in-the-ti-nspire-math-library%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think @Piglet has the answer - but when testing - use the simplest example possible. That is use
answer = math.eval("5+9")
. Also don't expect too much. The Lua API is ... well ... not exactly rich in the "working with expressions" department.– soegaard
Mar 25 at 13:15