low level substitution

Messages in english

Modérateur : xcasadmin

XcasEngGuy
Messages : 145
Inscription : mer. janv. 13, 2010 3:20 pm

low level substitution

Message par XcasEngGuy » dim. mai 07, 2023 6:24 pm

Is it possible to substitute values into an equation without evaluating the result so a student can see the equation with the numbers substituted in each location (like you would if you were doing it by hand)?

Matt

parisse
Messages : 5734
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: low level substitution

Message par parisse » lun. mai 08, 2023 6:28 am

It's not possible right now, but it could be. Maybe adding quote as optional last argument?

XcasEngGuy
Messages : 145
Inscription : mer. janv. 13, 2010 3:20 pm

Re: low level substitution

Message par XcasEngGuy » lun. mai 08, 2023 8:32 pm

I don't understand "last optional argument". Could you give an example?

parisse
Messages : 5734
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: low level substitution

Message par parisse » mer. mai 10, 2023 10:54 am

subst(sin(x),x=pi,quote)
would return sin(pi) instead of 0.

XcasEngGuy
Messages : 145
Inscription : mer. janv. 13, 2010 3:20 pm

Re: low level substitution

Message par XcasEngGuy » mer. mai 10, 2023 6:12 pm

I get 0, the same as without quote. I may have a config setting wrong.

Matt

parisse
Messages : 5734
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: low level substitution

Message par parisse » mar. mai 16, 2023 4:08 pm

It's not yet in the binaries.

XcasEngGuy
Messages : 145
Inscription : mer. janv. 13, 2010 3:20 pm

Re: low level substitution

Message par XcasEngGuy » mar. mai 16, 2023 6:14 pm

Ok, great. I will check later.

Thanks,
Matt

compsystems
Messages : 556
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: low level substitution

Message par compsystems » sam. mars 23, 2024 2:02 pm

Hi, why is the following statement not returning 'y+x+x'?

subst(a+b,[a = (y+x),b = x],quote)

parisse
Messages : 5734
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: low level substitution

Message par parisse » lun. mars 25, 2024 10:04 am

It does if autosimplification is off.

Répondre