Operator | Input |
+ | A+B |
- | A-B |
x | A*B |
÷ | A/B |
^ | pow(A,B) |
modulo | mod(A,B) |
most built-in functions support list : eg. exponential | exp(A) |
The most important point shown from the above table is that performing calculation between two lists is as easy as performing calculation between two numbers. We can also see that in standard vector calculation, there is not multiplication and division between two vectors. Insteads, there is two different operations for vectors. One is called dot product and the other is called vector product but they have different definition from list multiplication and division. So, list arithmetic is not the same as operations between vectors. Later, we will see that there is advantages in defining the list arithmetic in our own way. Now, Let us do some examples. (Note : some of the calculation below is not supported by the free version of the calculator) :
- (1,2,3)+(2,3,4)
Input : (1,2,3)+(2,3,4)
Ans. 3,5,7
- (1,2,3)-(2,3,4)
Input : (1,2,3)-(2,3,4)
Ans. -1,-1,-1
- (1,2,3)x(2,3,4)
Input : (1,2,3)*(2,3,4)
Ans. 2,6,12
- (1,2,3)÷(2,3,4)
Input : (1,2,3)/(2,3,4)
Ans. 0.5,0.667,0.75
- 1+(2,3,4)
Input : 1+(2,3,4)
Ans. 3,4,5
- 1-(2,3,4)
Input : 1-(2,3,4)
Ans. -1,-2,-3
- 2x(2,3,4)
Input : 2*(2,3,4)
Ans. 4,6,8
- 1÷(2,3,4)
Input : 1/(2,3,4)
Ans. 0.5,0.333,0.25
- (1,2,3)÷2
Input : (1,2,3)/2
Ans. 0.5,1,1.5
- (e1,e2,e3)
Input : exp((1,2,3))
Ans. 2.718,7.389,20.086
- (cos(1)+sin(1),cos(2)+sin(2),cos(3)+sin(3))
Input : cos((1,2,3))+sin((1,2,3))
Ans. 1.382,0.493,-0.849
- To take the statistics data such as mean,std dev. etc for a list (1,2,3,4,5)
Input : stat((1,2,3,4,5))
Ans. OK and a table of result is shown on the right-handed side of the calculator.
- To make a list of (0,1,2,3,4)
Input : id(5)
Ans. 0,1,2,3,4
- To make a list of (1,2,3,4,5)
Input : 1+id(5)
Ans. 1,2,3,4,5
- To make a list of (0,0.1,0.2,...,0.9,1)
Input : id(11)/10
Ans. 0,0.1,0.2,....,0.9,1
- To make a list of (5,5.1,5.2,...,5.9,6)
Input : 5+id(11)/10
Ans. 5,5.1,5.2,....,5.9,6
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.