Sorted New Commands in 32


There are a bunch of new commands for Lists, Screen control, and Statistics

 

List

* Append[ <List>, <Object> ]

Appends the object to the list

 e.g. Append[{1, 2, 3}, (5, 5)] gives you {1, 2, 3, (5, 5)}

* Append[ <Object>, <List> ]

Appends the list to the object

 e.g. Append[(5, 5), {1, 2, 3}] gives you {(5, 5), 1, 2, 3}

* CountIf[ <Condition>, <List> ]

Counts the number of elements in the list satisfying the condition

 e.g. CountIf[ x < 3, {1, 2, 3, 4, 5} ]

 e.g. CountIf[ x<3, A1:A10] where A1:A10 is a range of cells in the spreadsheet

* First[ <List> ]

Returns the first element of the list

* First[ <List>, <Number n of Elements> ]

Returns a list containing just the first n elements of the list.

* Insert[ <Object>, <List>, <Position> ]

Inserts the object in the list at the given position.

 e.g. Insert[ x^2, list1, 3 ]

If position is negative, the position is counted from the right

 e.g. Insert[ (1,2), list1, -1 ] places the point at the end of the list

* Insert[ <List 1>, <List 2>, <Position> ]

Inserts all elements of list1 in list2 at the given position.

 e.g. Insert[ {11, 12}, {1, 2, 3, 4, 5}, 3 ] gives you {1, 2, 11, 12, 3, 4, 5}

If position is negative, the position is counted from the right

 e.g. Insert[ {11, 12}, {1, 2, 3, 4, 5}, -2 ] places list1 at the end of list2 before its last element and gives you {1, 2, 3, 4, 11, 12, 5}

* Intersection[ <List 1>, <List 2> ]

Gives you all elements that are part of both lists

* Join[ <List 1>, <List 2>, ...]

Joins the two (or more) lists (no re-ordering of elements, keeps all elements even if they are the same)

e.g. Join[ {1,2,3}, {4,5,6} ]

* Join[ <List of Lists> ]

Joins the sub-lists into one longer list (no re-ordering of elements, keeps all elements even if they are the same)

e.g. Join[ { {1,2,3}, {4,5,6}, {7,8,9} } ]

* KeepIf[ <Condition>, <List> ]

e.g. KeepIf[ x<3, {1,2,3,4,1,5,6} ] returns {1,2,1}

* Last[ <List> ]

Returns the last elements of the list.

* Last[ <List> , <Number n of Elements>]

Returns a list containing just the last n elements of the list.

* Product[ <List> ]

Calculates the product of all list elements

* RemoveUndefined[ <List> ]

Removes undefined objects from a list

e.g. RemoveUndefined[Sequence[(-1)^i, i, -3, -1, 0.5]]

* Reverse[ <List> ]

Reverses the order of a list

* Sort[ <List> ]

Sorts a list of numbers, text objects or points (sorts points by x-coordinate)

  e.g. Sort[{3, 2, 1}]

  e.g. Sort[{"pears", "apples", "figs"}]

  e.g. list1 = Sort[{A, B, C}] list2 = Sequence[Segment[Element[list1, i], Element[list1, i + 1]], i, 1, Length[list1] - 1]

* Sum[ <List> ]

Calculates the sum of all list elements. Works for numbers, points & vectors, text and functions

 e.g. Sum[{1,2,3}] gives you a = 6

 e.g. Sum[{x^2,x^3}] gives you f(x)=x^2 + x^3

 e.g. Sum[Sequence[i,i,1,100]] gives you a = 5050

 e.g. Sum[Sequence[1 / (2 k - 1) sin((2 k - 1) x), k, 1, 20]]

 e.g. Sum[{(1, 2), (2, 3)}] gives you point A = (3, 5)

 e.g. Sum[{(1, 2), 3}] gives you point B = (4, 2)

 e.g. Sum[ {"a","b","c"} ] gives "abc"

* Sum[ <List>, <Number n of Elements> ]

Calculates the sum of the first n list elements. Works for numbers, points & vectors, text and functions

e.g. Sum[{1, 2, 3, 4, 5, 6}, 4] gives you 10

* Take[ <List> , <Start Position m>, <End Position n> ]

Returns a list containing the elements from positions m to n of the list.

* Union[ <List 1>, <List 2>]

Joins lists and removes items that appear multiple times

 

Screen and image

* AxisStepX[]

* AxisStepY[]

Return the current step for the x-axis or y-axis respectively. Together with the Corner[n] and Sequence[] commands, these allow you to create custom axes.

* Corner[ <Number n of Corner> ]

Creates a point at the corner of the Graphics View (n = 1, 2, 3, 4) Note: This point is not visible on screen.

* Corner[ <Image>, <Number n of Corner> ]

Creates a point at the corner of the image (n = 1, 2, 3, 4)

* Corner[ <Text>, <Number n of Corner>]

Creates a point at the corner of the text (n = 1, 2, 3, 4)

 

Statistics

* BarChart[ <Start Value>, <End Value>, <List of Heights> ]

e.g. BarChart[10, 20, {1,2,3,4,5} ]

 gives you a bar chart with five bars of specified height in the interval [10, 20]

    * BarChart[ <Start Value>, <End Value>, <Expression>, <Variable>, <From Number>, <To Number> ]

    * BarChart[ <Start Value>, <End Value>, <Expression>, <Variable>, <From Number>, <To Number>, <Step Width> ]

 e.g. p = 0.1

      q = 0.9

      n = 10

      BarChart[ -0.5, n + 0.5, BinomialCoefficient[n,k]*p^k*q^(n-k), k, 0, n ]

    * BarChart[ <List of Raw Data>, <Width of Bars> ]

 e.g. BarChart[ {1,1,1,2,2,2,2,2,3,3,3,5,5,5,5}, 1]

    * BarChart[ <List of Data>, <List of Frequencies>]

<List of Data> must be a list where the numbers go up by a constant amount

 e.g. BarChart[ {10,11,12,13,14}, {5,8,12,0,1}] 

 e.g. BarChart[{5, 6, 7, 8, 9}, {1, 0, 12, 43, 3}]

 e.g. BarChart[{0.3, 0.4, 0.5, 0.6}, {12, 33, 13, 4}]

    * BarChart[ <List of Data>, <List of Frequencies>, <Width of Bars> ]

<List of Data> must be a list where the numbers go up by a constant amount

 e.g. leaves gaps between bars: BarChart[ {10,11,12,13,14}, {5,8,12,0,1}, 0.5]

 e.g. line graph: BarChart[ {10,11,12,13,14}, {5,8,12,0,1}, 0]

* BoxPlot[ <yOffset>, <yScale>, <List of Raw Data> ]

 e.g. BoxPlot[0, 1, {2,2,3,4,5,5,6,7,7,8,8,8,9} ]

    * BoxPlot[ <yOffset>, <yScale>, <Start Value>, <Q1>, <Median>, <Q3>, <End Value> ]

 e.g. BoxPlot[0, 1, 2, 3, 4, 5, 6 ]

* CorrelationCoefficient[ <List of x-Coordinates> , <List of y-Coordinates> ]

    * CorrelationCoefficient[ <List of Points> ]

This command was renamed from "PMCC" to "CorrelationCoefficient" (February 17, 2009), Product moment correlation coefficient

* Covariance[ <List 1 of Numbers> , <List 2 of Numbers> ]

Calculates the covariance using the elements of both lists

    * Covariance[ <List of Points> ]

Calculates the covariance using the x- and y-coordinates of the points

* FitExp[ <List of Points> ]

Calculates the exponential regression curve

    * FitLine[ <List of Points> ]

Calculates the y on x regression line of the points.

    * FitLineX[ <List of Points> ]

Calculates the x on y regression line of the points.

    * FitLog[ <List of Points> ]

Calculates the logarithmic regression curve

    * FitLogistic[ <List of Points> ]

Calculates the regression curve in the form a/(1+b x^(-kx)) The first and last datapoint should be fairly close to the curve. The list should have at least 3 points, preferably more.

    * FitPoly[ <List of Points>, <Degree n of Polynomial> ]

Calculates the regression polynomial of degree n

    * FitPow[ <List of Points> ]

Calculates the regression curve in the form a x^b. All points used need to be in the first quadrant of the coordinate system.

    * FitSin[ <List of Points> ]

Calculates the regression curve in the form a + b sin(cx+d) The list should have at least 6 points, preferably more. The list should cover at least two extremal points. The first two local extremal points should not be too different from the absolute extremal points of the curve.

* InverseNormal[ <Mean>, <Standard Deviation>, <Probability> ]

Calculates the function inversephi(x) * ( standard deviation ) + ( mean ) where inversephi(x) is the inverse of the pdf for N(0,1) (pdf = probability density function, ie a non-negative function with area 1) Returns the x-coordinate which has the given probability to the left under the normal distribution curve.

* Mean[ <List of Numbers> ]

Calculates the mean of the list elements

    * MeanX[ <List of Points> ]

Mean of the x coordinates of the points in the list

    * MeanY[ <List of Points> ]

Mean of the y coordinates of the points in the list

    * Median[ <List of Numbers> ]

Determines the median of the list elements

* Mode[ <List of Numbers> ]

Determines the mode(s) of the list elements

 Mode[{1,2,3,4}] returns {}

 Mode[{1,1,1,2,3,4}]  returns {1}

 Mode[{1,1,2,2,3,3,4}] returns {1,2,3}

* PMCC[ <List of x-Coordinates> , <List of y-Coordinates> ]

    * PMCC[ <List of Points> ]

This command was renamed to CorrelationCoefficient (February 17, 2009), Product moment correlation coefficient

* Q1[ <List of Numbers> ]

Determines the lower quartile of the list elements

    * Q3[ <List of Numbers> ]

Determines the upper quartile of the list elements

* RandomNormal[ <Mean>, <Standard Deviation>]

Generates a random number from a normal distribution

    * RandomPoisson[ <Mean> ]

Generates a random number from a poisson distribution

* SD[ <List of Numbers> ]

Calculates the standard deviation of list elements

    * SigmaXX[ <List of Numbers> ]

    * SigmaXX[ <List of Points> ]

Calculates the sum of squares (of list elements, or x coordinates of points)

 e.g. you can work out the variance of a list with

 SigmaXX[list]/Length[list] - Mean[list]^2

    * SigmaXY[ <List of x-Coordinates> , <List of y-Coordinates> ]

    * SigmaXY[ <List of Points> ]

Calculates the sum of (the product of the x and y coordinates). For bivariate data, SigmaXY works out sum of (x coord times y coord)

 e.g. you can work out the covariance of a list of points with

 SigmaXY[points]/Length[points] - MeanX[points] * MeanY[points]

 (if 'points' is a list of Points)

    * SigmaYY[ <List of Points> ]

Calculates the sum of squares of y coords. For bivariate data, SigmaYY = sum of (y coord ^2)

* Sxx[ <List of Numbers> , <List of Numbers> ]

Calculates the statistic sigma(x^2) - sigma(x)*sigma(x)/n

    * Sxx[ <List of Points> ]

Calculates the statistic sigma(x^2) - sigma(x)*sigma(x)/n

    * Sxy[ <List of Numbers> , <List of Numbers> ]

Calculates the statistic sigma(xy) - sigma(x)*sigma(y)/n

    * Sxy[ <List of Points> ]

Calculates the statistic sigma(xy) - sigma(x)*sigma(y)/n

    * Syy[ <List of Numbers> , <List of Numbers> ]

Calculates the statistic sigma(y^2) - sigma(y)*sigma(y)/n

    * Syy[ <List of Points> ]

Calculates the statistic sigma(y^2) - sigma(y)*sigma(y)/n

 These quantities are simply unnormalized forms of the variances and covariance of X and Y given by

 Sxx    =    N var(X)   

 Syy    =    N var(Y)   

 Sxy    =    N cov(X,Y)

 http://mathworld.wolfram.com/CorrelationCoefficient.html

 So for example you can work out the correlation coefficient with:

 Sxy[points] / sqrt(Sxx[points] Syy[points])

 if 'points' is a list of Points.

* Variance[ <List of Numbers> ]

Calculates the variance of list elements

This is available as a word doc -SortedNewCommands.doc