In Calc Embedded Mode, you can define a variable with the
:= operator. You can then use it in an equation using the
=> operator and it will be automatically updated when you change the variable. See (calc) Assignments in Embedded Mode.
- Create a new buffer containing:
x := 3 x + 2 => 9999
C-x * a)
C-x * u) on the bottom equation. It changes to
x + 2 => 5
Now enter embedded mode on the top equation and change it to
x := 30. The bottom one will change to
x + 2 => 32.
But this doesn't work with functions. Create a buffer containing
f(x) := 2 x f(2) => 9999
C-x * a anywhere and invoke
C-x * u on the bottom equation. It changes to
f(2) => f(2). Changing the top equation doesn't affect the bottom one.
Is there any way to define a function from within Calc or does it have another way of dealing with this? I know of
defmath but that doesn't help in e.g. a Latex document (unless you define the function twice, likely making mistakes).