231 Reputation

10 Badges

14 years, 151 days

MaplePrimes Activity

These are questions asked by awass

I frequently title my plots to identify what is being plotted. Very often that means specifying a parameter. For example, I might want the title to read;  Exponential when the power is c.

In the above I want to replace c with a real number. For example, my command might read

> for c from 1 to 10 do
p||c := plot( x^c, x= -1..1, title= the power is c )
end do:

I can then display the sequence of plots nicely labelled.

That does not work.


I cannot find adequate  info about what follows title =  in the help pages or the manual so I end up creating a worksheet and experimenting for quite a while until I find something that works.
(The Help page says: “The value t can be an arbitrary expression.” That’s it. One can go to the typesetting page to get more info about captions which is probably relevant but it begins to feel like learning about sex by looking up words in the dictionary.

BTW, I have been using Maple for 18+ years so I should have a cheat sheet somewhere to remind me of the correct syntax but I am suggesting that Maple would be much more user friendly if this info was in the help pages.

It would be very nice to have a fuller explanation with more examples.

Here is what works:

c:=3;  # special case


plot(x^c, x=-1..1,title=`power is `|| c);  Why back quotes?


plot(x^c,x=-1..1,title=[`power is `||cc]);   why barckets?

or not as nice
plot(x^c,x=-1..1,;  why dots?

or if you get rid of the is
plot(x^c,x=-1..1,title=[power = c]);  why noy use is?


not as nice
plot(x^c,x=-1..1,title=[power = cc]);  ugly quote marks


Here is a list of failures in this very simple case:




plot(x^c,x=-1..1,title="power is c");


plot(x^c,x=-1..1,title=power is c);



cc:="c";plot(x^c,x=-1..1,title="power is cc");

plot(x^c,x=-1..1,title=power is cc);



cc:=convert(c,string);plot(x^c,x=-1..1,title="power is cc");


cc:=convert(c,string);plot(x^c,x=-1..1,title="power is cc");


plot(x^c,x=-1..1,title='power is cc');


plot(x^c,x=-1..1,title=[power, is, cc]);


plot(x^c,x=-1..1,title='power = cc');


plot(x^c,x=-1..1,title=power = cc); but plot(x^2,x=-1..1,title=[power = cc]);is acceptable

another couple of failures:

plot(x^c,x=-1..1,title=[`power is c`]);


plot(x^c,x=-1..1,title=[`power is cc`]);



I am trying to enter an ODE into Maple and I remember that Dr. Lopez showed how to use a prime to denote differentiation. When I try I get conflicting results: if I type

>  y''+y'+3*y=0;;

Error, unexpected single forward quote
But if I copy that command from the Help page Maple understands what I want. What is going on?

BTW, there is no entry for Differential Equations on the Help page.



The Help pages says:

Import a Worksheet from XML
  Open an existing XML document as a worksheet to modify the content or to change its appearance.
1. From the File menu, select Open. The Open dialog appears.
Select the Maple Worksheet as XML file type.

Those instructions do NOT apply to Maple 2018 on a Mac (although I have verified they DO apply on a Windows machine.) No dialog appears.

My .mw file is 90% format information and thenbits and pieces of Maple code. Is there some way to just extract the maple stuff? The file is pretty long and cutting out the xml stuff is very time consuming.



I have a procedure that changes the value of an input variable quite unexpectdly. Can anyone explain why? I have a very simplified example of this below.

switch := proc (V::Vector)
description "This procedure is supposed to take a Vector V and switch entries 1 and 2";
local W,a,b;
W:= V;
a:= W[1];
b:= W[2];
W[1 ] := b;  
W[2] :=a;
end proc;

I have omitted the output for brevity's sake but all works well as expected.

returns V2 not V1. Why is the procedure changing V1?

The problem occurs with matrices but not with lists.




Here is a simple procedure that works fine if entered using 1D Maple input
> Q:=proc(x)
end proc;
but if you use 2D math input
> q:=proc(x)

  end proc;

Error, unterminated procedure

      procApplyFunction(x) sinApplyFunction(x),

      Typesetting:-merror("unterminated procedure")))
Error, unable to parse
    Typesetting:-mambiguous(  Typesetting:-mambiguous(end,

      Typesetting:-merror("unable to parse")) procsemi)

Ouch! But to confuse things further the following procedures may be entered using 2D math and work fine:
>H := proc (x) x^2*sin(x) end proc;
>K := proc (x) sin(x^2) end proc;
Doesn't make any sense to me. Perhaps 2D math is not ready for prime time?


1 2 3 4 5 6 7 Page 1 of 8