USE OF EXPR() COMMAND
|
08-05-2024, 05:45 PM
Post: #1
|
|||
|
|||
USE OF EXPR() COMMAND
Hi, this program calculates the equation of a straight line passing through two points.
I am not able to get the equation to appear in the command line without the quotation marks at the beginning and at the end of the equation. Can someone help me to remove the quotation marks? Thank you, Victor EXPORT RECTA2DET() BEGIN // Asegurarse de que estamos en el modo CAS y declarar las variables locales LOCAL M1,detM1,x1,y1,x2,y2,q; INPUT({{x1,[0],{30,20,0}},{y1,[0],{60,20,0}},{x2,[0],{30,20,1}},{y2,[0],{60,20,1}}},{"Introducir A1(x1,y1) y A2(x2,y2)"}); // Definición de la matriz simbólica M1 usando el entorno CAS M1:= CAS("[[x2-x1,y2-y1],[x-x1,y-y1]]"); // Calcular el determinante de la matriz M1 en el entorno CAS detM1:= CAS("det(M1)"); // Mostrar la ecuacion general de la recta y retornarla a la linea de comandos para un uso posterior si es necesario q:= detM1+"=0"; PRINT("Ecuacion gral. de la recta: "+q); RETURN (EXPR("q")); END; |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
USE OF EXPR() COMMAND - Victorcastrejon - 08-05-2024 05:45 PM
|
User(s) browsing this thread: 2 Guest(s)