Do• Do[expr, {imax}] evaluates expr imax times. • Do[expr, {i, imax}] evaluates expr with the variable i successively taking on the values 1 through imax (in steps of 1). • Do[expr, {i, imin, imax}] starts with i = imin. • Do[expr, {i, imin, imax, di}] uses steps di. • Do[expr, {i, imin, imax}, {j, jmin, jmax}, ... ] evaluates expr looping over different values of j, etc., for each i. • See also: For, Table, While.
Examples Using InstantCalculatorsHere are the InstantCalculators for the Do function. Enter the parameters for your calculation and click Calculate to see the result.
Entering Commands DirectlyYou can paste a template for this command via the Text Input button on the Do Function Controller. Here is a Do loop that adds the first 1000 integers.
Out[6]= |  |
Clear the variable definition.
|