Carl Love

Carl Love

27579 Reputation

25 Badges

12 years, 59 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@minhthien2016 According to that Wikipedia page, a dihedral angle of a polyhedron is always an interior angle. I stand by the correctness of my Answer: Pi/3 and arccos(1/sqrt(3)).

@Paras31 Did you execute the code by downloading the worksheet from my Answer, or by copy-and-pasting the code from my Answer? I'm wondering if the problem is a 2D Input / Document Mode anomaly, things that I have very little experience with (or patience for).

@Andiguys The \n is the newline control character, I guess it doesn't work in 2D Input, which I never use. It's not a year-version issue, because I've been using it in Maple for over 20 years. It's purpose was to give extra space between the legend box and the w. You can just remove it: Change `w\n` to 'w'. Note that I also changed the quotes from backward to forward.

@emendes I'm not sure if you're asking a followup question, or you were about to and then figured it out. Does my selector (the one with And) work for you?

@Andiguys You could replace `πm` and `Πm` with pi__m and PI__m.

Here's how to do the plot (of course, there are a vast number of stylistic possibilities for presenting the same data):

W:= <seq(30..95)>:
TRC__min:= <seq(s[w][1], w= W)>/10^10:
Tau1__min:= <seq(eval(tau1, s[w][2]), w= W)>:
Tau2__min:= <seq(eval(tau2, s[w][2]), w= W)>:
plot(
    [<W | Tau1__min>, <W | Tau2__min>, <W | TRC__min>], 
    legend= [tau1__min, tau2__min, 'TRC__min'*10^``(-10)],
    labels= [`w\n`, ``], axes= boxed, thickness= 4
);

This plot uses the data from your original worksheet in this thread. If you've subsequently made changes that would change the numeric value of wtau1tau2, or TRC, then those new numbers aren't shown in this plot.

@emendes To select procedures whose names begin with d_, change procedure to 

And(procedure, suffixed('d_'))

in the select command.

@JAMET Are you incapable of making even the slightest generalization from my "advice"? The code in your Question contains 3 occurences of \\nAll three need to be changed to \n.

@nm The help page ?assuming says that (I'm paraphrasing) assuming a property in general without attaching it to specific subexpressions applies the property to all names in the expression. The problem is that y(x) is not considered a name, (but it is considered a function). This works:

simplify(residual) assuming positive, y(x)::positive

@JAMET This is one of your printf commands:

printf(`X=%a,   Y=%a   --->  %a\\n`, a, b, buff);
#This is the problem           ^^

Change \\ to \.

I am just reiterating @nm 's Answer (although I wouldn't say "\n is special").

In Maple 2023 on Windows 11, I've see A very frequently, B occasionally, and I don't recall ever seeing C.

@Andiguys I see in your wortksheet this procedure definition:

TRC:= (tau2, tau1)-> subs(DATA, `&Pi;m`);

This is incorrect usage (although not necessarily an error) because the variables on the left side of -> do not explicitly appear on the right side, yet they appear indirectly via `&Pi;m`. The indirect references will not be associated with the procedure parameters tau2 and tau1; instead, they will remain global variables. To create a procedure parameterized via indirect reference (this will also work for direct reference, but it's not necessary), use

TRC:= unapply(subs(DATA, `&Pi;m`), [tau2, tau1]);

In Maple 2023+, MakeFunction is a synonym for unapply, because it makes more sense in common English.

@C_R I suspect that MapleSim doesn't have nontrivial arithmetic of matrices, polynomials, and even matrices of polynomials over finite fields, which is one of the uses of Maple's mod. By "nontrivial", I mean that the arithmetic includes determinants, inverses, and solutions of linear systems.

mod has two modes: modp and mods. The default is modp, which you're calling a "digital clock"; mods is the "analog clock". To change the mode, do `mod`:= mods before using mod in its usual form. `mod` is an environment variable, which means that if it's set in a procedure, it reverts after the procedure exits.

I don't understand why you object to using frem in the way you suggested.

@felixiao The plus sign "+" is also not allowed in a MaplePrimes file name.

@goebeld If ex is a mathematical expression, then

indets(ex, specindex(y))

willl return all indexed occurences of y as an independent variable. If you want to find indexed occurences of y as a functional variable (e.g., y[2,2](x)), then use

indets(ex, typefunc(specindex(y)))

or you could search for both of these with the single command

indets(ex, {typefunc, thistype}(specindex(y)));

To return just the set of indices used on y, use

[op]~(subsindets[2](Ys, function, 0, op))

where Ys is the set returned by any of the above indets commands.

There is never a good reason in Maple to convert a mathematical expression to a string to extract mathematical information from it. If you ever feel a need to do it, ask here for help.

@mmcdara My primary purpose was to illustrate that in this case converting it to a module-based package is so trivial that it can be done without even explicitly listing the exports

Yes, ToInert is definitely an experts' command, and FromInert is a level even beyond that.

First 6 7 8 9 10 11 12 Last Page 8 of 703