improper op or subscript selector - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Error Message Guide : improper op or subscript selector

Error, improper op or subscript selector

 

Description

Examples

Description

This error occurs when the op command is used to extract an operand that does not exist.

 

The index must be an integer and must refer to an operand that exists in the expression.

Examples

Example 1

In this example, using the op command to extract the 15th operand results in an error.

s  seriessinx, x = 2, 6 

s:=sin2+cos2x212sin2x2216cos2x23+124sin2x24+1120cos2x25+Ox26

(2.1)

op15,s

Error, improper op or subscript selector


Solution:

Using the nops command, you see that there are only 14 operands.

 

nopss

 

14

(2.2)

To access the last element, use the following command:

op14,s

6

(2.3)

Example 2

Again, calling the op command to extract an operand outside the bounds of the list results in an error.

La,b,c,d

L:=a,b,c,d

(2.4)

op5, L

 

Error, improper op or subscript selector


Solution:

Modify the arguments to the op command to extract an element within the list. Use the nops command to determine the number of operands.

See Also

op and nops