Symbolic computation via a persistent Python subprocess: new `.sym`
Value variant carries (srepr, pretty), `OctiveLean.SymPyBridge` owns
the subprocess and round-trips expressions, and `evalBinOp`/unary
negation route through SymPy when either operand is `.sym`. Corpus
adds sym_basic, sym_solve_simplify, sym_calc; demos add Lorenz,
Van der Pol, gravity, SymToolboxDemo, Lab7Interp.
DSL surface changes from `octave! ... octave_end` to `octave! { ... }`.
RosettaStone rewritten against the new syntax; PlotDemo updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 lines
143 B
Matlab
5 lines
143 B
Matlab
x = sym('x');
|
|
disp(solve(x^2 - 4, x));
|
|
disp(simplify(sym('sin(x)^2 + cos(x)^2')));
|
|
disp(factor(sym('x^2 - 1')));
|
|
disp(expand(sym('(x+1)^3')));
|