diff command doesn'texecute in a program
|
08-10-2024, 12:20 PM
Post: #1
|
|||
|
|||
diff command doesn'texecute in a program
In below program, diff command doesn't execute in CAS view, any suggestion?
EXPORT DERIVADA() BEGIN LOCAL fx, x, n, resultado; // Solicitar al usuario la función y el orden de la derivada INPUT({{fx,[-1],{27,73,0}}, {n,[0],{46,10,1}}}, {"Derivada de una función f(x)"},{"Funcion f(x):","Orden de la derivada:"},{"",""}); // Definicion de la variable independiente x x := 'x'; // Calculo de la derivada de orden n de la función f(x) resultado := diff(fx,x,n); // Mostrar el resultado PRINT(); PRINT("Función original: "+fx); PRINT("Derivada de orden "+n+": "+resultado); // Devolver el resultado RETURN resultado; END; |
|||
08-11-2024, 07:06 AM
Post: #2
|
|||
|
|||
RE: diff command doesn'texecute in a program
Hello Victor
What worked for me was to store the expression with the derivative in a string variable (cmd), then use the CAS and EVAL functions. EVAL was necessary because, if not used, the program returned an unevaluated string. Code: EXPORT derivada() Hope this helps, Regards. |
|||
08-14-2024, 01:30 PM
Post: #3
|
|||
|
|||
RE: diff command doesn'texecute in a program
Thank you, Patocuy for the helpful tip.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)