there
is another distribution with more style and different features here
Lists
The structure [2,5,8] or [a,b,f(x)] is a list and not
a matrix or vector.He can appear everywhere a number can appear but
is not number.Rather is a group of numbers. So
[2,3,4]*[4,5,6]->[8,15,24], 5/[1,2,5] ->[5,2.5,1],
[2,3,4]^[4,2,1]->[16,9,1], Σ[1,2,3,5] ->11
means sum of list elements, Πa means product of elements of list
a (i.e Π[2,3,4,6] -> 144)
warning!
lists must have the same number of elements, Other words [1,2]+[4,5,6]
is an error (without error message by now).But[1,2]+[4,[5,6]]
is OK because they have same number of elements.
Σ
: control-T for IE, "copy and paste" for Netscape returns the sum of
elements
Π : control-U for IE, "copy and paste for Netscape returns
the product of elements
◄:
control-\ for IE, usual for Netscape, [1,2]◄4 -> [1,2,4],
[1,2,[3,4]]◄[2,[4,5]]◄22 -> [1,2,[3,4],2,[4,5],22]
also
the usual max(x) and min(x) (you don't need help for this)
function
r2c(x): ie colums to rows c2r([[1,2,3],[5,6,7]])-> [[1,5],[2,6],[3,7]]
~ : used to "split" a list (SuperCalc specific)
the
Σ and Π are operations with the greatest priority. So Σ[2,5]!
means 7! and not 2!+5!
Σ
is an operation like + * /, which needs a list right of it (or
a function who returns a list)
√Σ[2,3]
is an error because √ expect an
expression and not an operation. √(Σ[2,3])
is OK
But
having defined a function say f(x)=[x,x/2] and a variable a=[3,4]
then Σf(a) is valid (f is not an operation). Valid is also the
Πsin(a) (product of sinus of elements)
(hmmm,
i think this must be explained in details)
About the ~:
Syntax
[a,b]~c , divide the interval a to b in c sections like this [3,8]~5
-> [3.5, 4.5, 5.5, 6.5, 7.5]
Use:
approximation of integrals or provide data for plot.
Integral
of sin over [0,pi]: Σsin([0,pi]~100)*(pi-0)/100 -> 2.0000..
(angles in rad)
or
aproximate the surface below sin and cos but above the line f(x)=x*2/pi
, interval [0,pi/2]
surface=if(lesser>f(data),lesser-f(data),data-data)
( data - data return a list with 1000 zeros)
Σsurface*(pi/2-0)/steps
(and don't forget angles in rad)
Data manipulation
Say
you have a "multidimensional" list data=[ [1,2,3],
[4,2,1], [4,4,2], [6,2,6], [10,1,6] ]
then
R(data,0) -> [1,4,4,6,10] ie the list of the first elements
R(data,1) -> [2,2,4,2,1] the list of the
second elenents and so on
Now
watch this
f(x)=(R(x,0)+R(x,1))/R(x,2)
f(data)
->[1, 6, 4, 1.33333, 1.833333
]
or
this way
f(x,y,z)=(x+y)/z
f(R(data,0),R(data,1),R(data,2))
One
last.You can't mix list and units.(this time)
Some examples with root symbol
2+√2 means 2 plus
the square root of 2
4*3√27 means 4 times the
third root of 27 think of it like
4*3√27
2^4√16 means 2^ (4√16)
and 3√9^2 means (3√9)^2 ( √
has greater priority than ^)
3!√9! means
3! root of 9! (! has greater priority)
(a+b)√(y+z)*c means (a+b
root of y+z) times c
√√4
is not allowed (exactly as ++ or ** is not allowed) ( √(√4)
is OK). In supercalc √ is an operation like ^
or *, who expect an expression right of it.(if you omit the left
operator he suppose it is 2), The 3!! is correct because factorial
does not need expression right of it.
but √4√9√27
is OK (from left to right 2√9√27 then 3√27
then 3)