Page History: Programming

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2011/02/10 12:41


SMath Studio has several programming commands, so you can write procedures.

Besides what is below, there are also tutorials available here: Tutorials on programming in SMath Studio: pdf | zip

These are if,for, while and line.

Examples

programming

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:

Nothing selected

2. Left-click anywhere on the loop in question.  The loop will be surrounded by a selection box:

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.

Context menu

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.

ScrewTurn Wiki version 2.0.37. Some of the icons created by FamFamFam.