1
News / Re: Release of FormulaPro for the Nspire
« on: November 24, 2013, 07:17:49 pm »
Is there a way to allow for a table output to my missing variable? For example I have an equation that gives 4 different angles, 2 of which are useful; however from looking at this code it restricts the solution to the max value in the table as well as only outputting as a number. Basically I'd just like to be able to put in a few inputs and get my solution out as if I had done solve. Inputs would not change from a single number for each input.
Thanks for your time. This program has been a lifesaver.
Code: [Select]
function math.solve(formula, tosolve)
local eq="max(exp" .. string.uchar(9654) .. "list(solve(" .. formula .. ", " .. tosolve ..")," .. tosolve .."))"
--local eq = "nsolve(" .. formula .. ", " .. tosolve .. ")"
local res = tostring(math.eval(eq)):gsub(utf8(8722), "-")
--print("-", eq, math.eval(eq), tostring(math.eval(eq)), tostring(math.eval(eq)):gsub(utf8(8722), "-"))
return tonumber(res)
end
Thanks for your time. This program has been a lifesaver.