## 345 Reputation

10 years, 66 days

## Option in pointplot for interpolated cur...

Maple

Hello,

Is there an option/ or a way so as to ask pointplots to plot a interpolated curve for the points defined ?

Thank you for you help.

## For loop and non local index...

Maple

Hello,

I have a little question about the property "local" or not of a index in a for loop.

I notice that when I make "for loop" the index i is not local. In the small example, when I ask to evaluate i after having done this loop, the answer is 5 and not i.

Example :

for i from 1 to 4 do
i^2
od;

i; --> 5

How can I do to ask Maple to use index as local ?

Thanks a lot for your help.

## How to determine an angle in [-Pi,Pi]?...

Maple

Hello,

After trigonometric manipulations in a mechanical problem, I can obtain the desired angles but defined with modulo 2Pi.

I would like to program or find a function which can do this operation :

While angle doesn't belong to [-Pi, Pi]

do

If angle > Pi then do angle = angle - 2Pi

If angle < - Pi then do angle = angle + 2Pi

end

Is there an existing function which can do this operation ?

Otherwise, may you help me to program it ?

Thanks a lot for your help

## Suppress the complex components...

Maple

Hello,

How can I do to suppress all the complex components of a vector ? Is there a simple code to do this?

For example, I would like to replace the complex components with zero.

If the considered vector is a:= [2+I,2,5], i would like to obtain after modifications amod:= [0,2,5] ou amod  [Nothing,2,5]

VectorWithComplexComponents.mw

Nota :

The origin of my issue is to be able to plot points with the following syntax :

pointplot([tp,xp,symbol = solidcircle,color=black,symbolsize = 10): where xp is a vector with, sometimes, some complex components.

I would like to plot the points only for the real components of xp

Thanks a lot for your help

## Several outputs from procedure...

Maple

Hello,

I would like to obtain the display of several outputs from a procedure.

Sorry for this question which should be quiet simple but I didn't manage to solve my issue. By the past, I always wanted to obtain only one output from a procedure.

I put attached a example of procedure which calculates x^2 and x^3 for a given value of x.

With my procedure, I didn't obtain the display of the output calculating the square value.

How can I display all the outputs of a procedure ?