Post Reply 
Command for having a list of variables of an equation?
08-29-2015, 10:09 AM
Post: #3
RE: Command for having a list of variables of an equation?
Hello John,
Thank you very much for your prompt answer. Unfortunately this is not what i am looking for. These CAS commands return only the list of lower case variables and only the one from a to z.

In a formula like: Surf = ((B1 + B2) * h)/2 i would like to have a list or a vector of variables like that including 'Surf', 'B1', 'B2' and h.

I know that i could use 's' for 'Surf', 'b' for 'B1' but this is not the point. If i have to think about an equation and i have to deal with a change of variable names, this implies an additional mental effort to me. I did it for the calculation of the inertia moment for generic shapes and believes me that it has been a nightmare to visually detect the errors.

What i am trying to do now is to adapt my old equation library dealing with the new and very powerful HVars and DelHVars commands to create variables in HOME, store an Eq, Solve it and then removes the variables.

One aspect that i discovered last night was the HVars command in the format HVars ("name", 2). This command returns the list of variables included in the 'name' variable if 'name' is a function. The issue again is that (i think) I cannot store a function without defining (STOring) each individual variable in advance.

At the moment my only solution for shaping my personal Eqlibrary is to ask to the user: the equation, the equation name and the list of variables. In this way i can create all the variables before storing the EQuation, solve the equation for any of its variables and then ask the user if he/she wants to delete the variables.

I hope someone can have another solution thinking out of the box,

Thanks

Giancarlo
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Command for having a list of variables of an equation? - Giancarlo - 08-29-2015 10:09 AM



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