510 Reputation

10 Badges

4 years, 298 days

MaplePrimes Activity

These are questions asked by sand15

No need to hurry, esthetics is not a vital issue ... but thanks in advance.

PS : sorry for the syntax errors "waves" generated in the original Word document

This question has been deleted by the author


Good morning everybody.

I have tried Explore to draw plots in an interactive way.

The function I want to draw (plot3d) is automatically constructed by a specific code, as well as the names of the parameters it depends on. These are of the form P||1, P||2, ...P||N (N is an integer determined during the construction)

... but I did not succeed !

After some investigations I was able to reduced the problem to the following one

N  := 2:
F  := add(P||k * x^k, k=0..N):
G := [seq(P||k=-1.0 .. 1.0, k=0..N)]:
Explore(plot(F, x=0..1), parameters=G)

The result is the classical imbedded window with a plot of -1-x_x^2 and three sliders below.
But as soon as I push anu of them the plot disappears and connot be recoverd.

But the following sequence seems to work as expected

N  := 2:
F  := add(P__k * x^k, k=0..N):
G := [seq(P__k=-1.0 .. 1.0, k=0..N)]:
Explore(plot(F, x=0..1), parameters=G)

Before changing my code, could you please confirm me that parameter names such that P||k are not correctly accounted for by Explore ?

Auxiliary question : more generally, are there points which I have to count carefully when I use the P||k construction ?

Thanks in advance

Good morning everybody

I know this question has already been widely discussed, for example in

I used the answer Kitonum then gave because I have basically the same kind of problem.
As an illustration, here is a sketch of my coding :

N := 3:
for k from 1 to N do
   MyPlot||k := PLOT(CURVES(....)):
end do:
plots:-display(seq(MyPlot||k, k=1..N));

The only difference is that I use PLOT instead of plot ... so I have thought that using LEGEND instead of legend would give me the desired result.
But I don't understand how to use LEGEND and how to place the legend in the correct location.

I will appreciate any answer,
Thanks in advance

Hi all,

I start working with the Grid package.
To familiarize myself with it I ran the "primeChecker" example, which of course has worked perfectly well.

Next I did this (a priori harmless) simple modifications :

  1. within the primeChecker procedure :
    replace  myVal := userData[thisNode+1] :
    by         myVal := userData[thisNode+1, 1] :
  2. before launching the procedure with Grid[Launch] :
    replace  userData := [ .... ] :  #which is a list
    by         userData := [ .... ] :  # the same thing
                 userData := convert(userData, matrix): 

I get the following error message :
error, (in unknown) Matrix index out of range

What does it mean and how can I fix this ?

Thanks in advance

First 13 14 15 16 17 Page 15 of 17