Michael

222 Reputation

11 Badges

18 years, 240 days

MaplePrimes Activity


These are questions asked by Michael

I have some library program files written using Maple 11 (or before).

I can read and use the file programs and they have worked fine for many years.

But I would like to actually see the programming commands that are buried within with a view to modification, so, according to the Maple "Help" file, I tried the following command sequence:

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

restart;
interface(echo=4,quiet=false);
interface(echo);
interface(quiet);
                            1, false

                               4

                             false

read "C:\\Program Files (x86)\\Maple 11\\test3.m";

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

But there is no echo.

So, how do I read (and modify) these files?

Thank you

Hello:

I have created a simple plot and labelled a line as follows

Lbl:=plots[textplot]([600,-Pi*floor(R)*ln(R)-0.01,typeset(-pi*floor(r)*ln(r)),font=[Helvitica,bold,10]],labels=[T," "]):

where R is a number, so the label appears near where I want it to be:

But part of the formula is floor(r) and I can't make that appear as the 2D mathematical symbol for floor(r) in the typeset;

If I make the typeset part of an axis label or a legend, I can cut and paste the math2 expression for floor(r) just before I export the plot and that works, but how do I do that for a textplot that is sitting in the middle of a plot?

Thank you.

Hi:

In a plot title, I want  A^(1)(x) to appear - that is, the first derivative of the function A(x) with the "1" enclosed in brackets because that is the standard notation for derivatives of the special function A.

Alternatively, I'll be happy to use A'(x) - and I know that there are calculus characters on the pallet that are supposed to do that, but they all just become Diff and that is no good for other reasons.

So, here is the closest I've come:

Test:=plots[textplot]([3,3,typeset(A^[1],"(x)")]);

and that almost works, except if I change the [1] to (1), Maple tries to evaluate it as an expression and it disappears. If I change 1 to 2 it works fine, except I want the first derivative.

I've tried quotes, uneval, backquotes and all I get is an error or the quotes showing up as text.

Does anyone know how to do this?

Thank you.

Hi:

I am using solve(...,allsolutions)

and Maple is giving me the default "_Z1~" as part of the solution. No problem.

But when I go back and run the same statement again without a restart, it gives me "_Z2~" and my program fails because it is looking to substitute a value for "_Z1".

How do I reset the naming convention without restarting so I can get the same output each time I run the same statement. (BTW: The same thing happens with Veil where it increments the indices of the Veil symbol each time you run the same statement)..

Thank you.

I have an expression of the form X=a/f^b where a and b are both numeric. How do I elegantly extract the numerical values of "a" and "b" given X? See below for my kludge solution.

Problem: extract two numerical values from an expression. Surely there is a more elegant way?
Here is the form of the expression.

restart;
X:=a/f^b;

a/f^b

(1)

Find a and b when they are numbers.
X1:=subs(a=1.234,b=6.789,X);

1.234/f^6.789

(2)

indets(X1);
fterm:=op(2,%);
log(fterm);This sometimes works and yields 6.789*log(f) but I've never been able to figure out when it is going to work and when it won't work.
#log(fterm,f);This never works

{f, 1/f^6.789}

 

1/f^6.789

 

ln(1/f^6.789)

(3)

b:=-op(2,fterm);

6.789

(4)

a:=X1*f^b;

1.234

(5)

Isn't there a better way? This requires that the "op" indices won't ever change and that is asking a lot if this is embedded in a larger program.


 

Download Extract.mw

 

1 2 3 4 5 6 7 Page 1 of 8