Page History: Programming
Compare Page Revisions
Page Revision: 2010/05/12 12:38
SMath Studio has several programming commands, so you can write procedures.
These are
if,
for,
while and
line.
Examples
Take care that some complicated programming structures are not implemented.
The Need for Speed!
If your loops are running too slowly use eval to speed them up. I've got one program that is 500 times faster using eval.
You can often gain a speedup by setting the Optimization mode to Numeric as follows:
1. Let's start with nothing selected:
2. Left-click anywhere on the loop in question. The loop will be surrounded by a selection box:
3. Right-click anywhere on the loop. The context menu will now have a setting for Optimization. Set this to "Numeric." The Optimization setting automatically applies to all operations within the selection box.
4. When you left-click outside the loop, SMath Studio will recalculate the page (if you have main-menu option
Calculation > Auto calculation turned on). The calculation will typically be faster than it was with Optimization set to Symbolic.