## 450 Reputation

6 years, 308 days
Maple is to me difficult. The first version I bought was Maple9, and it was more than 15 years ago. But, I couldn't use it, feeling it too difficult. But, three years ago, I thought Maple might be helpful to my study, and since then, I have continued to learn Maple. As I got able to read the Maple help, I think that I could get to use maple better now than before. But, I feel that I am a beginner yet.

## the meaning of []...

Maple

Hello Those who are in Mapleprimes.

I want to know the meaning of [].

That is,

a:=[1,2,3];

b:=a[];

What were returned was

b:=1,2,3

This result is the same as that obtained from

b:=op(a);

What kind of meaning does a[] have?

I want to know the logic of this expression.

## local variables and strings...

Maple

To those who read this post.

I have a question about the property of local variables in a procedure.

Are names at the local variables in procedures, strings not names?

If so, why can strings be evalated to have Integer, which is numbers for counting for continuing repetition?

This is the code which searches for the maximum value.

**************************************************

Max2 := proc()

local i, m :: string;
if nargs = 0 then
return -infinity
end if;
m:= args[1];
for i from 2 to nargs do
if args[i] > m then
m := args[i]
end if;
end do;
m;
end proc:
Max2(1,7,5,4,6,10,35,63.5,-10,5);

************************************************

type(a,name);

type(1, string)

this answer was false, of course.

I limited the values of local variables to be string.

But, to the sequence 1,7,5,4,6,10,35,63.5,-10,5, any error messages wouldn't appear.

I hope any of you will give me an answer.

## The meaning of \%1...

Hello those who attends Mapleprimes,

I have a question.

A programme was written in a text:

n:=5

if n=0 then

0

elif n=1 then

1/2

elif n=2 then

sqrt(2)/2

elif n=3 then

sqrt(3)/2

else error "bad argument: \%1", n;

end if;

The answer of this programme was

What I couldn't understand was the meaning of \%1

Could you tell me about it to me?

taro

## select and the use of \$...

Dear people in mapleprimes,

I have a question which is probably very elementary.

> integers:=[10..15]:
> select(isprime, integers);
Then, "Error, selecting function must return true or false" appears.

On the other hand,

> integers:=[\$10..15]:
> select(isprime, integers);

Then , [11, 13] appears.

What role does the character "\$" play here?

taro

## expansion of product of variables...

Maple

Please tell me how to do about the following problem to me.

g:=(b*y)^k*k*y;

simplify(%);

Then, what I obtained was (b*y)^k*k*y, not (b^k)*k*y^(k+1).

expand of the command brought the same answer not (b^k)*k*y^(k+1).

Please tell me what was wrong to my calculation.