Saturday, 29 August 2015

Graphing

TLCalc has a powerful graphing system offering you 7 different plot types and up to 20 simultaneous plots of any combination.

The plotting interface was revised in V1.17. This documentation is for V1.17 and above only. 


Plotting mode is accessed in the menu >> Graphing mode. This brings up the screen for inputting plots. To add a plot, click on the [+] icon at the top. You will be asked to pick a plot type. The plots available are:
  • Function: single variable expressions f(x) or f(y) on the x/y axis.
  • Polar: plots r(t) where t is the angle and r(t) is the distance from the origin.
  • Parametric: plots x(t) and y(t) on the x/y axis where t is the changing variable.
  • Implicit: plots f(x,y) = 0. This mode is extremely slow compared to other modes. Avoid adding more than one implicit plot, especially on large screen devices. 
  • Stat-Plot: plot matrix data (see notes) as scatter, line, column or stem plot.
  • Stat-Histogram: plots a histogram for matrix data (see notes).
  • Stat-Box&Whisker: plots the box and whisker plot for matrix data (see notes). 
Some notes:
  • Tap on the card header closes and opens the card for editting
  • Plots with invalid information will be ignored from plotting
  • Tapping on the function information when the card is collapsed will hide the function (red X means the plot is hidden)
  • Plots are removed using the [x] button. The [↑] button is used to reorganise plots by moving plots up one spot.
  • Variables x, y and t can only be used if the function accepts them. E.g. using t in the implicit plot will cause the plot to be marked as invalid. 
  • You can use variables other than x, y or t in the plot expression to experiment with constants. When plotting, a slider will appear allowing you to adjust the constant's value. Except from stat plots, '#' variables such as #a are not supported at all in graphing mode because of performance reasons.
  • Stat plot requires a general variable (such as #a) that is currently storing a matrix. The matrix within the variable must contain only real finite values (NaN or complex values will cause the matrix to be rejected). Use the drop down to specify the variable containing the dataset you want to use. Matrices which are not linear (one column or one row) are treated as linear by reading of one row at a time. If the variable you want to use is not in the list, make sure the variable contains a matrix and that it contain no complex or non-finite values. 

An example of a function and polar plot added:



Once you are done editing the plots, tap on [Plot] to view the graphs.


To navigate the graph:
  • Drag to move the view around
  • Pinch diagonally to zoom in and out (maintains current aspect ratio)
  • Pinch horizontally or vertically to zoom in x or y axis only (does not maintain current aspect ratio)

You can also add markers to identify features in the graphs. Tap on [...] and pick a feature type to find. This will run a search on all the plots (you cannot exclude particular plots from this search). Tap on a marker to get more precise reading of its position. You can also add a trace marker which you drag around to observe the x and y value at that point. [CLR] is used to remove all added markers.
Note that feature finding or tracing is not supported for implicit plots. The intersection finder also has some limitations associated with it. 



[FX] returns you to the plot editor. You can also navigate to table mode which shows you each plot evaluated at regular intervals apart by tapping on [Table]. Note that the first column is for t which is the placeholder for the changing variable and is internally converted to x or y for functions and indices for stat plots. Following columns are the x and y values evaluated at the corresponding t value for each plot. Implicit plots are not compatible with table mode and are not shown.



Number Bases

Since V1.14, TLCalc allows you to change number bases. TLCalc goes one further and allows you to use any number base from 2 to 36. Other calculators normally limit you to 2 (binary), 8 (octal), 10 (decimal) and 16 (hexadecimal). The other bases are rarely used however so most of you won't have any use for other bases.

To change the base, in the main calculator mode, go to the menu >> settings. The number base setting is near the bottom:


Some caveats to using number bases other than 10:
  • This is a relatively new feature and may have bugs
  • This setting only applies to the calculator mode. Base-10 is used in all other modes irrespective of this setting
  • When using bases higher than 10, numeric values starting with a letter must have 0 prefixed. This is to let TLCalc know you want the number value instead of the variable. Also be careful when using letter variables which can be mistaken for the numeric values. Use * to break up letters. E.g. 2*a ≠ 2a in bases higher than 10.
    Warning: TLCalc does not format algebraic expressions correctly all the time when the base is higher than 10. E.g. typing 2*a returns 2a which is interpreted as a number.
    In general, mixing of algebraic variables with bases other than 10 is discouraged.
  • Exponential multiplier E is unusable (i.e. the E in 5E2 = 5x102 = 500). As such, the range of calculation results available in modes other than base-10 is severely reduced. When the value is too large to be shown, OVERFLOW is returned.

Using Variables

TLCalc allows you to store 24 complex values and 26 general values for a total of 50 variables. The 24 complex variables are letters a-z excluding e and i which have special meaning inside TLCalc as the exponential constant and imaginary constant respectively. To store a complex value, specify the variable name followed by an equals symbol:

    a = 2+3i

To use the variable, just type in the letter:

    a = 2+3i

The general variables are simply variables proceeded by the hash symbol:

    #a = 2+3i

The general variables are special as they can be used to store results that aren't just complex values. They can also be used to store expressions and matrices.

    #b = [2,4;2,3+4i]
    #c = x+2x^2

Note that unlike complex variables, general variables #e and #i are allowed.

When you use variables that have not been defined, TLCalc will simplify the expression for you. Note that TLCalc's algebra system is very basic and will not always produce the best results. TLCalc is best suited to numerical calculations.

Warning: when the number base is higher than 10, letters used by the number system may be confused for numeric values. Use a multiplication (*) symbol to separate the variable if it follows a number. E.g. if a is a variable, then 2a should be entered in as 2*a in bases higher than 10.