Error, invalid input: too many and/or wrong type of arguments passed to ...; first unused argument is ...
Description
Examples
This error is caused by incorrect arguments passed to a command. For correct syntax, see the help page for the command. You can use the type command to verify whether an argument is of the correct type required by the command.
Example 1
In the following example, attempting to sum more than one summand at a time results in an error.
sumi2,i,i
Error, invalid input: too many and/or wrong type of arguments passed to sum; first unused argument is i
Solution:
To sum more than one summand at at time, use the map command.
mapsum,i2,i,i
13⁢i3−12⁢i2+16⁢i,12⁢i2−12⁢i
Example 2
In the following example, attempting to calculate the sum of i+j over both index variables results in an error. This statement is not well-defined.
sumi+j,i=1..3,j=6..8
Error, invalid input: too many and/or wrong type of arguments passed to sum; first unused argument is j = 6 .. 8
Depending on the interpretation, one possible solution is to express the sum in the following manner: if the indices are meant to be sequenced individually, then the following statement corrects the error and produces the intended result.
sumsumi+j,i=1..3,j=6..8
81
Otherwise, if the indices are meant to be sequenced in tandem, then the following statement corrects the error and produces the intended result.
sumevali+j,j=i+5,i=1..3
27
Example 3
The following example uses the solve command to solve a linear system, however the braces have been omitted around the list of expressions and the list of variables.
solve⁡32⁢x+13⁢y+42⁢z=50,87⁢x+190⁢y+112⁢z=940,10⁢x+10⁢y4+10⁢z=10,x,y,z
Error, invalid input: too many and/or wrong type of arguments passed to solve; first unused argument is 87*x+190*y+112*z = 940
Enclosing the list of expressions and the list of variables in braces fixes the error.
solve⁡10⁢x+10⁢y4+10⁢z=10,32⁢x+13⁢y+42⁢z=50,87⁢x+190⁢y+112⁢z=940,x,y,z
x=15483115,y=3232623,z=−24733115
See Also
eval
map
sum
solve
Download Help Document