Post Reply 
arg() crashes the emulator
02-24-2015, 03:24 PM (This post was last modified: 02-24-2015 03:30 PM by Han.)
Post: #13
RE: arg() crashes the emulator
(Assuming CAS view)

f(x):=x^2;
f; // returns (x)->(x^2)

lname(f); // returns [ x ]

If you want to make your own program to do what you want to do, you can use the string() function which converts objects into character strings.

fs:=string(f); // convert f into a string
rp:=instring(fs,")"); // find the first ) char
fs:=mid(fs,2,rp-2); // get (rp-2) characters starting at position 2
fpar:=CAS(fs); // convert var list into { var1, var2, ..., varn }

You can use list2mat() if you want fpar to be enclosed by []'s.

This is essentially the same as lname(). (Note lname() is limited to user CAS functions.)

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
arg() crashes the emulator - Angus - 02-20-2015, 10:56 AM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 11:28 AM
RE: arg() crashes the emulator - Angus - 02-20-2015, 11:49 AM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 12:10 PM
RE: arg() crashes the emulator - dg1969 - 02-23-2015, 07:33 PM
RE: arg() crashes the emulator - Angus - 02-20-2015, 12:14 PM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 12:25 PM
RE: arg() crashes the emulator - Angus - 02-20-2015, 12:31 PM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 01:43 PM
RE: arg() crashes the emulator - Angus - 02-24-2015, 06:19 AM
RE: arg() crashes the emulator - Han - 02-24-2015, 12:21 PM
RE: arg() crashes the emulator - Angus - 02-24-2015, 01:15 PM
RE: arg() crashes the emulator - Han - 02-24-2015 03:24 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 06:00 AM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 08:47 AM
RE: arg() crashes the emulator - Han - 02-25-2015, 02:54 PM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 07:01 PM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 07:22 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 03:02 PM
RE: arg() crashes the emulator - Han - 02-25-2015, 04:02 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 04:13 PM
RE: arg() crashes the emulator - Han - 02-25-2015, 04:18 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 04:25 PM



User(s) browsing this thread: 1 Guest(s)