Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 38 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

I can confirm all three of your observations on Windows 8.1/64 using Maple 17.02/64:

  1. That there is a memory leak; indeed it is some of the fastest memory consumption that I've ever seen. The memory usage is not reported on the Maple status line.
  2. That restart does not release the memory, even when followed by gc();
  3. That the difference of the two integrals that should be zero is not even close.

Since your code executes without any explicit error message, you'll need to explain why you think that there is a problem.

@mkharban Pi is capitalized in Maple. Also, after you execute restart, you need to re-execute the other lines also. It looks like you did not re-execute the lines defining the ranges X and Y.

And please read your email, at whatever email address you used to sign up for MaplePrimes.

@Axel Vogt wrote:

So users say "please set 'by time' as default" and Maple's answer is "do it yourself".

Note that the option to "do it yourself", i.e., to set the order, applies only to Answers. There is no way to set the order for the Replies (aka Comments) to the Answers. That order may even change between reloads of the same page.

Describe the algorithm, and I'll implement it in Maple.

@Kitonum Which goes to show that you'll need some variation in your X values if you want to get a meaningful answer. Otherwise, the answer is going to be a = X[1], b=0, c=0, regardless of the Y or Z values.

@Kitonum Can you explain why you used the divisor 7 rather than 8 in procedure P?

@Christopher2222 I think that Maple should detect the case where the weights are all positive integers and, in that case, use the standard formula.

@pepegna90 Replace RowDimension with LinearAlgebra:-RowDimension and likewise for ColumnDimension.

If you have further questions, please upload a worksheet, not a screenshot. If the worksheet depends on a data file for the Matrix, then upload the datafile also.

@Carl Love Here's an easier way: Fix the positions Alan=1 and Amy=8. Since there are eight seats, that makes Alan and Amy next to each other. All the other other constraints are about a direct next-to relationship; they never deal with a gap of two or more spaces. We've accounted for the circularity by saying that is next to 8. The rest of the constraints can be specified with the ordinary NextTo and Separated. I know it all sounds flaky, but it is easy to verify that the solutions thus generated satisfy all the constraints (under my interpretation of the constraints). So the whole problem can be done without any custom constraint procedures.

I have some difficulty figuring out what the problem's author means by "either" when it is in boldface and combined with "not" (as in "Alan does not sit next to either Debbie or Emily.")

I did the problem, and I got multiple solutions. Do you have a source that claims a unique solution? (Most problems billed as puzzles have a unique solution.) I'll post my solution in a separate Answer, later.

@smith_alpha You could use c:= rand(0..1)() every time you want to generate a random number (a random bit in this case). But if you want to generate multiple random bits, it is more efficient to do c:= rand(0..1) once, and then call c() every time you want a new one. The c:= rand(a..b) generates a procedure which generates a random number; it not itself generate the random number.

@noor-al-bahrain The real root is not a rational number. You cannot find the fraction because the fraction doesn't exist.

There is a difference between convert(x, rational) and convert(x, rational, exact). Consider

x:= evalf(1/3);
                      
0.333333333333333
convert(x, rational);
                             
  1/3
convert(x, rational, exact);
                       
333333333333333/1000000000000000

@henrylyl When you pass a Vector (or other rtable) as a procedure argument, it only passes a pointer to the object rather than making a copy of the object. The same is true when you assign one Vector (or other rtable) to another with :=. So, if A is Vector, after the assignment

B:= A;

any changes made to B will be made to A also, and vice versa. To avoid this, you need to use the copy command:

B:= copy(A);

Now A and B are completely separate objects. In your case, you can make your procedure call with copy like this:

SLRrepeatedsample(copy(X), copy(Y), 2, .95);

Or you can use the copy command with the assignment inside the procedure.

 

You have only one loop, not a nested loop.

@henrylyl Two problems I see immediately. The first is that LinearFit is spelled with a capital F. You have a lowercase f in several places. The second is Why is x a Vector? It only has a single value. In the line beginning ySE:=, you try to use x as if it were a scalar.

First 566 567 568 569 570 571 572 Last Page 568 of 709