Page 1 of 1

...

Unread postPosted: 16 Mar 2018, 13:42
by ciaone
...

Re: Problem with zeros()

Unread postPosted: 16 Mar 2018, 16:24
by Extra44
i don't find a solution mais made some try to understand and to help ...

string(var) give : "{x,y}"
and expr(string(var)) give : {x,y}
so maybe .... zeros(eq,expr(string(var)))
but ... (in french) we have an error : "Erreur : L’argument doit être un nom de variable."
Not working, it need a variable name ... !

So ... I don't know too.
Maybe there's a function to transform an string to a list of expression ...
Not funny (for you)
Good luck

Re: Problem with zeros()

Unread postPosted: 16 Mar 2018, 19:58
by Hamza.S
Hello!

try expr("zeros("&string(eq)&","&string(var)&")")

Re: Problem with zeros()

Unread postPosted: 16 Mar 2018, 23:33
by Extra44
Nice ! Good job ! :bj: :bj:
I'm not far away ! :'(

...

Unread postPosted: 17 Mar 2018, 09:29
by ciaone
...

Re: Problem with zeros()

Unread postPosted: 17 Mar 2018, 19:37
by Bisam
I may explain why the calc acts like that.

When typing solve(eq,var), the calc doesn't evaluate "var". It only uses its name and tries to solve the equation for this variable name.
The only way to force evaluation of "var" to {x,y} and then solve is the one given by Hamza.S.

Some other functions act the same way, e.g. the derivative function. First, only the variable name is used and then, when the derivation has been made, the variable value is substituted.
This way, one can compute exact derivative values, even on non CAS Nspire !

Example :
Code: Select all
v:={x,y}
derivative(v^2,v)

will return {2x,2y}