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
Too early in the morning to have SODA?
Definition of 'vrit'
A word for delight at someone else's failure?
In the US, can a former president run again?
Designing a magic-compatible polearm
What is the meaning of "понаехать"?
Is there any proof that high saturation and contrast makes a picture more appealing in social media?
Did the CIA blow up a Siberian pipeline in 1982?
Covering index used despite missing column
How to work with PETG? Settings, caveats, etc
How do internally carried IR missiles acquire a lock?
Umlaut character order when sorting
How much steel armor can you wear and still be able to swim?
What triggered jesuits' ban on infinitesimals in 1632?
Why is "Congress shall have power to enforce this article by appropriate legislation" necessary?
What is "industrial ethernet"?
Print one file per line using echo
How do I see debug logs for Change Data Capture triggers in Salesforce?
How many people are necessary to maintain modern civilisation?
What was the first third-party commercial application for MS-DOS?
What constitutes a syllable?
Subtract the Folded Matrix
Second 100 amp breaker inside existing 200 amp residential panel for new detached garage
Do I have to explain the mechanical superiority of the player-character within the fiction of the game?
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 height:90px;width:728px;box-sizing:border-box;
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,94621123
8,94621123
asked Mar 25 at 6:48
Max NovaMax Nova
165
165
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,94621123
8,94621123
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
165
165
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