Professional Documents
Culture Documents
Calculations
Plot Functions
Programming
Scripts Script Functions Numerical Scripts Commands Compiler Include Include Folder
Interface
Button Pad Function Catalog Keyboard Shortcuts Main Menu Options Quick Menu Options Overview
Screenshots
Entering Expressions
From SpaceTimeWiki
An expression is a group numbers, operators, variables, and functions or a combination of these elements. Expressions are evaluated by pressing Enter on your keyboard or by pressing the Solve Button on the button pad.
Simple Expressions
Algebraic Expressions
Derivatives
Integrals
You can also enter multiple lines in an entry by pressing Shift + Enter to create a new line.
See also
Graphing Equations
From SpaceTimeWiki
You can plot equations using many different methods in SpaceTime.
The simplest method is by pressing Ctrl + Enter on your keyboard or by pressing the Plot Button on the button pad.
See also
Plot, 2D Graphing, ListPlot, ImagePlot, BodePlot Plot3D, 3D Graphing Time Graphing
Time Graphing
From SpaceTimeWiki
The variable T is used to create time graphs for 2D and 3D graphing. The value of T is incremented every frame by T-step in the Time Window. This creates an animated graph.
See also
Plot, 2D Graphing, ListPlot, ImagePlot, BodePlot Plot3D, 3D Graphing
Lists
From SpaceTimeWiki
Lists are created using square or curly brackets and each element in the list is separated by a comma.
Set a list of variables equal to a list of values. Both lists must be the same length
Access the values of a list using parenthesis. The starting index of a list is one.
Access multiple values of a list by inputting of list for the indexes. This example returns the first, third, and fifth element in the list.
Access multiple values of a list by using colon notation. This example returns a list starting at the second element and ending at the fourth element in the list.
Set a value in a list equal to another value by using the equals sign.
See also
Max(List) , Min(List) , Mean(List) , Variance(List) , StandardDeviation(List)
Matrices
From SpaceTimeWiki
Matrices are created using square or curly brackets and each element in the matrix is separated by a comma. This example creates a 2x2 matrix.
Access the values of a matrix using parenthesis. The starting index of matrix values is one. This example returns the second value from the first row.
Set a value in a matrix equal to another value by using the equals sign.
See also
Matrix functions
Strings
From SpaceTimeWiki
SpaceTime can also output strings.
Strings can be concatenated with other strings, values, ... by using the Append(a,b) command Currently, you cannot do any other operation on strings
Examples
Plot
From SpaceTimeWiki
The Plot function plots 2D functions, parametric, polar, implicit, and contour graphs. This function also lets you specify your graphing variable, graphing window, and type of 2D graph.
You can also plot graphs by clicking the Plot Button or by pressing Ctrl + Enter. Learn more about 2D Graphing.
Plot(equation)
This is the simplest way to use plot. These examples plot a single equation and the type of graph is auto detected by using the default 2D graphing variables.
See also
2D Graphing, ListPlot, ImagePlot, BodePlot Plot3D, 3D Graphing Time Graphing
Plot3D
From SpaceTimeWiki
The Plot3D function plots 3D functions, parametric, spherical, and cylindrical graphs. This function also lets you specify your graphing variable, graphing window, and type of 3D graph. You can also plot graphs by clicking the Plot Button or by pressing Ctrl + Enter. Learn more about 3D Graphing.
Plot3D(equation)
This is the simplest way to use plot. These examples plot a single equation and the type of graph is auto detected by using the default 3D graphing variables.
This example uses multiple line input to graph a more complicated 3D parametric plot.
See also
Plot, 2D Graphing, ListPlot, ImagePlot, BodePlot 3D Graphing Time Graphing
ListPlot
From SpaceTimeWiki
The ListPlot function plots 2D scatter plots, histograms, box plots, and normal probability plots.
ListPlot(list)
ListPlot(list, type)
list1 = x-values first group list2 = y-values first group list3 = x-values second group list4 = y-values second group ....
See also
Plot, 2D Graphing, ImagePlot, BodePlot Plot3D, 3D Graphing Time Graphing
BodePlot(function,var)
From SpaceTimeWiki
BodePlot(function,variable,minimum,maximum,mode) creates a Bode plot for the given function.
function : is the function to plot variable : is the independant variable minimum : start sweep frequency : min (rad/sec) maximum : end sweep frequency : max (rad/sec) mode = 0 : magnitude plot (= default mode) mode = 1 : phase plot in degrees mode = 2 : phase plot in radians
x = -2 : => = 0.01 rad/sec x = -1 : => = 0.1 rad/sec x = 0 : => = 1 rad/sec x = 1 : => = 10 rad/sec x = 2 : => = 100 rad/sec x = 3 : => = 1000 rad/sec ...
When the frequency is not given, then min = 0.01 rad/sec and max = 1000 rad/sec. The y-axis is either the magnitude in dB (mode=0) or the phase in degrees (mode=1) or the phase in radians (mode=2)
See also
Plot, 2D Graphing, ListPlot, ImagePlot Plot3D, 3D Graphing Time Graphing
Examples
ImagePlot
From SpaceTimeWiki
The ImagePlot function plots an image from a matrix of real values.
ImagePlot(matrix)
This plots a grayscale image. The values in matrix are assumed to be from 0.0 to 1.0 where zero is black and one is white.
ImagePlot(r, g, b)
This plots a color image. The values in r, g, and b are assumed to be from 0.0 to 1.0 where zero is black and one is red, green, or blue.
Examples
This example creates a script using ImagePlot to output an image.
See also
Plot, 2D Graphing, ListPlot, BodePlot Plot3D, 3D Graphing Time Graphing
Scripts
From SpaceTimeWiki
Scripts are a series of Commands, Expressions, Functions, and Script Functions which all together create a new function.
Creating Scripts
Scripts are created by pressing the index button located next to each entry. The index button is the blue square numbered button.
Scripts have a Name and a list of Parameters that are used to identify them. Once written, the script is called as Name(parameter(s)) A parameter has the name and the function of a variable. Parameters are used to pass user input to the script. You can specify multiple parameters by separating each variable name by a comma in the Parameters field. Optional parameters should be given as parameter_name=value. When the caller does not supply parameter, then value is taken per default. All variables (including the parameters) used within a script are local variables. They are ONLY available within the script. You can use conditional statements or special commands within a script. Scripts can return single values, lists, matrices, strings or they can create plots. Scripts are called just like built-in functions in SpaceTime by typing the script name followed by each parameter separated by a comma between parenthesis. You can call a script as a single statement or you can assign the result of a script to a global variable.
Examples
A very simple script that returns the cube of an expression. Only one parameter is passed to the script.
Name : Cube Parameter : x Script Definition : x * x * x Script Return : x3 Script Calling : Cube(value)
Name : Area Parameters : width, depth Script Definition : width * depth Script Return : area Script Calling : Area(value width, value depth)
This script creates a matrix for use with ImagePlot. Scripts can also return images and graphs when the output is a plot function.
Name : Static Parameter : size Script Definition : from line 1 to 7 Script Return : ImagePlot Script Calling : Static(value)
See also
Creating Scripts, Script Functions, Commands, Compiler, Include, Include Folder
Script Functions
From SpaceTimeWiki
If(condition)
If condition evaluates to zero then the block of code is skipped. If condition evaluates to a non-zero value then the block of code is evaluated.
equal to : == not equal to : != greather than : > greather than or equal to : >= less than : < less than or equal to : <=
Else If(condition)
If condition evaluates to zero then the block of code is skipped. If condition evaluates to a non-zero value then the block of code is evaluated. This function must be preceded by an If statment or another Else If statement.
Else
This statement evaluates a block of code when all other previous If and Else If statements failed.
Loop(iterations)
This function will loop through and evaluate a block of code the specified number of iterations.
Note : in above script x++ means x=x+1. Following functions are available within scripts :
x++ (x=x+1), x-- (x=x-1), x+=n (x=x+n), x-=n (x=x-n), x*=n (x=x*n), x/=n (x=x/n)
While(condition)
This function will loop through and evaluate a block of code until condition evaluates to zero.
Break
This statement will terminate a loop.
Error
This statement stops all further calculations and forces an error message to the user
Trace(variable)
This function is used for debugging. This function will output every instance when the specified variable's value was changed.
Include(file)
This function include SpaceTime files or SpaceTime code files into your notebook. This allows you to call all the scripts that are in the included file.
See also
Append(a,b), Part(expression, index), Strings, Function(function,Parameters), Call(function,Parameters) for other usefull script commands.
Numerical Scripts
From SpaceTimeWiki
SpaceTime uses a computer algebra system called MobileCAS for calculations. SpaceTime can store results symbolically as well as in decimal format. This is different from other programs such as MATLAB that store all numerical results as a decimal number.
You can reduce these answers to numbers in your scripts in two different ways.
This example uses the numerical command to force all results to reduce to a number. This is the best method to use in your scripts if you want the entire script to run in a numerical mode.
This example uses the number function to reduce a single result to a number.
Commands
From SpaceTimeWiki
Commands override user settings and also provide you with other tools.
Angle Mode
degrees Changes the angle mode to degrees. radians Changes the angle mode to radians.
Time
reset Resets the time clock to zero. time Returns the elapsed time since the last call to reset in milliseconds.
Computer Algebra
numerical Switches to numerical mode. symbolic Switches to symbolic mode.
Compiler
From SpaceTimeWiki
The compiler can compile scripts into Code files that you can include into SpaceTime using the Include function or by placing the file in your Include Folder.
Include
From SpaceTimeWiki
You can include SpaceTime files and code files into your notebook by using the Include function. Here is an example.
Include the file into the new notebook and call the script Cube.
Include Folder
From SpaceTimeWiki
This folder can be opened by clicking View and selecting Include Folder from the Main Menu. You can move or copy your code files here and they will be automatically included into the function catalog. This allows you to use your own functions as if they were built right into SpaceTime.
Button Pad
From SpaceTimeWiki
The Button Pad is used to enter expressions using your mouse or stylus.
Function Catalog
From SpaceTimeWiki
The Function Catalog allows you to view a list of all the available functions in SpaceTime. This list is accessed by pressing the Catalog Button on the lower right hand corner of the Button Pad. You can include your own functions in the function catalog by copying your code files (*.stc) into the Include Folder. Note: Functions included using the Include Function will not show up in the function catalog.
Keyboard Shortcuts
From SpaceTimeWiki
Enter
Enter
Evaluates an entry
Shift + Enter
Ctrl + Enter
Symbols
Special symbols are accessed by holding Crtl + Shift down and then pressing one of following characters.
Main Menu
From SpaceTimeWiki
File
New Creates a new file. Open Opens a file. Save Saves a file. Save As... Saves a file as a new name. Compile... Saves all the scripts into a compiled file.
Edit
Undo Redo Insert Entry Inserts a new entry into the notebook. Delete Entry Deletes the selected entry from the notebook. Cut Entry Cuts the entry from the notebook. Copy Entry Copies the selected entry from the notebook. Paste Entry Pastes the copied entry into the notebook. Order Entries Orders the indexes of the entries starting from 1. Insert File Name... Opens a dialog to insert a file name
View
Options Opens the Options dialog. Animation Lab Opens the Animation Lab. Include Folder Opens the Include Folder. Screenshots Folder Opens the Screenshots Folder.
Help
Tutorials Shows the tutorials
Options
From SpaceTimeWiki
Calculation Mode
Exact : press "enter" on an equation line Decimal : press "enter" again on the same equation line
Number mode
Fractions Decimals
Numbers
Angles
Radians Degrees
Complex Numbers
Rectangular Polar
note : Polar mode ALWAYS returns the result with argument in radians !
Precision
0 .. 16
Fraction Limit
Others
Auto Evaluate
When Auto Evaluate is set ON (green) then all equation lines are re-evaluated at startup. When Auto Evaluate is switched OFF (blank) then no recalculation is done at startup. At any time you can recalculate the whole file by pressing the keyboard shortcut Ctrl + Shift + Enter.
Debug Mode
Pressing "ESC" during the execution of a script cancels all further operations of that script. This can be very usefull if the script is running in an endless loop. (In versions prior to V3.0.0.3 this could be set On/OFF. Since version V3.0.0.3 this is always set to ON and does not slowdown SpaceTime anymore.)
Auto Crop
When Auto Crop is switched ON, then screenshots are limited to equation and plot lines. When Auto Crop is switched OFF, then a full screenshot (including right panel) is taken.
Options
This button is a fast access to the Options menu.
Functions
From SpaceTimeWiki
Elementary Functions
Basic functions : Plus(+), Minus(-), Multiply (*),Divide(/) Mod(m,n) sqrt(z) Power (^) nRoot(z,n) Factorial(n) or n! nCr(n,r) nPr(n,r) Binomial(n,r) Multinomial(nList) Pochhammer(n,k) Floor(z) Ceil(z) Sign(z) fPart(x) Round(number, digits)
Complex Functions
Trigonometric Functions
Circular Functions
Hyperbolic Functions
Sinh(z), Cosh(z), Tanh(z) Asinh(z),Acosh(z), Atanh(z) Csch(z), Sech(z), Coth(z) Acsch(z), Asech(z), Acoth(z)
Number Functions
Random(min, max) Bernoulli(n) Euler(n) Catalan(n) Fibonacci(n) Lucas(n) nFactors(n) nPrimes(n) Prime(n,p) IsPrime(n)
Algebra Functions
Expand(function) Together(function) Apart(function) Factor(function) SimplifyPoly(function) Solve(f(z),z) changed in revision V3.0.3 pSolve(f(z),z) nSolve(f(z),z,guess) Eval(f(z),z,val) PolyDivide(f(z),g(z)) Quotient(f(z),g(z)) Remainder(f(z),g(z)) PolyFit(pList,var)
Special Polynomials
Calculus Functions
Sum(f(n),n,n1,n2) Product(f(n),n,n1,n2) Limit(f(x),x,x0,-1/0/+1) D(f(x),x) D(f(x),x,n) Diff(f(x),x) fDiff(f(x,y,z,..),(x,y,z,...)) iDiff(f(x,y,z,..),(d_vars),i_var) pDiff(f(x,y,z,..),(f_vars),(f_equ),i_var) Int(f(x),x) Int(f(x),x,a,b) NIntegrate(f(x),x,a,b) Series(f(z),z,n) FourierSin(f(x),x,w) FourierCos(f(x),x,w) FourierSeries(f(x),x,n)
dot(A,B) cross(A,B) Norm(A) Gradient(function,varlist) Divergence(vector,varlist) Curl(vector,varlist) Laplacian(function,varlist) Jacobian(function,varlist,point) Hessian(function,varlist) Duf(function,varlist,point,direction) SurfaceNormal(function,varlist,point)
Graphing Functions
Special Functions
Gamma(z) Gamma(a,z) = Incomplete Gamma DiGamma(z) or Psi(z) Beta(m,n) Zeta(z) = Riemann Zeta Zeta(z,a) = Hurwitz Zeta Harmonic(z) Si(z), Ci(z) Ei(z), Li(z) Shi(z), Chi(z) FrenselSin(z) FresnelCos(z) Erf(z) Erfc(z) BesselJ(v,z) BesselY(v,z) BesselI(v,z) BesselK(v,z) KelvinBer(v,z) KelvinBei(v,z) KelvinKer(v,z) KelvinKei(v,z) HankelH1(v,z) HankelH2(v,z) AiryAi(z) AiryBi(z) Gudermannian(z) invGudermannian(z)
Matrices
SVD(A) Cholesky(A)
Statistical Functions
Min(List) Max(List) Mean(List) Variance(List) StandardDeviation(List) BinomialPDF, BonomialCDF ChiSquarePDF, ChiSquareCDF GeoPDF, GeoCDF NormalPDF, NormalCDF StudentPDF, StudentCDF PoissonPDF PoissonCDF InverseNormal
Data Functions
Constant Table
Other Functions
Clear(variable) Append(a,b) Part(expression, index) Size(list) Choose(test1, value1, test2, value2, ...) Variables(expression) Call(function,Parameters) Function(function,Parameters)