Issue with CAS solver function involving passing strings to the variable position.
|
09-30-2020, 04:06 PM
Post: #1
|
|||
|
|||
Issue with CAS solver function involving passing strings to the variable position.
I am writing a program that asks what the user would like to solve for and then pass that into the CAS Solve function. The program look like this:
[code]//Amplitude export Amplitude() BEGIN Local Find,Find_1,variables,Answer; Local Â,K,τ,ω; print(); //K=5, Â=0.0355 τ=10 ,ω=3.1415 ,E=.5 ,A=7 A:=0; CHOOSE(A,"Which Amplitude?","Final","Initial"); if A==1 then variables:={"Â","K","τ","ω","E","A"}; input({{Find,variables,{56,15,0}},{Â,[0],{10,20,1}},{K,[0],{10,20,2}},{τ,[0],{10,20,3}},{ω,[0],{10,20,4}},{E,[0],{10,20,5}},{A,[0],{10,20,6}}}); Find_1:=variables[Find]; Find:=Find_1; Answer:=CAS("SOLVE(Â=K*A/(sqrt((1-(τ*ω)^2)^2+(2*τ*ω*E)^2)),Find,1)"); print(Answer); end; END;[code] When I run this it returns "Error: Constant function" I have tried expr(Find) and also EVAL(Find) but both options failed to work. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Issue with CAS solver function involving passing strings to the variable position. - Grayhek - 09-30-2020 04:06 PM
RE: Issue with CAS solver function involving passing strings to the variable position. - Gene222 - 10-01-2020, 10:07 AM
RE:Issue with CAS solver function involving passing strings to the variable position. - Grayhek - 10-01-2020, 12:10 PM
RE: Issue with CAS solver function involving passingstrings to the variable position. - Gene222 - 10-01-2020, 04:38 PM
RE: Issue with CAS solver function involving passing strings to the variable position. - Grayhek - 10-01-2020, 09:55 PM
RE: Issue with CAS solver function involving passing strings to the variable position - Gene222 - 10-01-2020, 10:43 PM
|
User(s) browsing this thread: 1 Guest(s)