Fzen
Fzen

Reputation: 25

Compact declared in maple

In maple, I have declared

var := {m[1], m[2], m[3], 
m[4], m[5], m[6], 
m[7], m[8], m[9], 
m[10], m[11], m[12], 
m[13], m[14], m[15],
m[16], m[17], m[18], 
m[19],m[20], m[21], 
m[22], m[23], m[24],
m[25], m[26], m[27],
m[28], m[29], m[30],
m[31], m[32], m[33],
m[34], m[35], m[36],
m[37], m[38], m[39],
m[40]};

But it is too long. How to declare shorter ?

Upvotes: 2

Views: 48

Answers (1)

DSkoog
DSkoog

Reputation: 657

You could use the seq command to create a sequence for the m[i] terms:

var := { seq( m[i], i = 1..40 ) };

Upvotes: 1

Related Questions