Shortcut for Element and Substitute - Please, please, please

HopfenUndMalz shared this idea 8 years ago
Answered

These two go together very often e.g. when getting parts of a solution of a equation.

Nesting these two often gives very long, very hard to read expressions.

Even for a simple example:


sol:=Solve(x^2-5x+6)

x1:=Substitute(x,Element(sol,1))


this is a big expression.

In Maxima for example there is a postfix operator for substitution and a simple shortcut for getting elements of lists

x,sol[1]


What I would like to have is a shortcut - could the parser do this?

Comments (2)

photo
1

Or even

    x1 := RightSide[Element[sol,1]]

photo
1

Sorry we tried this and it caused big problems elsewhere.

© 2023 International GeoGebra Institute