Carl Love

Carl Love

28035 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

Are you trying to plot it, animate it, or find the volume?

@Kitonum To complete Kitonum's list, we must represent 188 as a sum of 6 distinct squares: 188 = 1 + 4 + 9 + 25 + 49 + 100. This is the only such representation. There is no representation using fewer distinct squares.

@anthonyfl It's just an isometry, so relabel the axes:

plots:-animate(
    plots:-display, 
    ['''plot3d''']~(
        [[r,t,r^2/8], [r,t,sqrt(r)]], 
        r= 0..4, t= 0..T, coords= cylindrical, 
        labels= ['x', 'z', 'y'], axes= normal, scaling= constrained,
        view= [-4..4, -4..4, 0..4]
    ),   
    T= 0..2*Pi, frames= 60, paraminfo= false
);

 

@anthonyfl It might be due to having an older version of Maple. Try this:

plots:-animate(
    plots:-display, 
    [''plot3d''~(
        [[r,t,r^2/8],[r,t,sqrt(r)]], 
        r= 0..4, t= 0..T, coords= cylindrical
    )],   
    T= 0..2*Pi, frames= 60
);

I think that that'll work in any version since Maple 13. Note that the quotes on plot3d are two pairs of single quotes, not one pair of double quotes.

@Carl Love There's another special case that's worth mentioning, especially because it comes up fairly often: If the value assigned to a name is a procedure (including arrow expressions such as x-> x^2), a module (including Records) that's not an object, or a table, then the default assignment is by address (perhaps the correct term is "by reference", as Acer says, but I prefer "address"). If you want the value in those cases. then you need eval. Examples:

restart:
A:= x-> 7*x:  B:= A:  A:= x-> 9*x:  C:= A:  B(x), C(x);

                           
9 x, 9 x
restart:
A:= x-> 7*x:  B:= eval(A):  A:= x-> 9*x:  C:= A:  B(x), C(x);

                           
7 x, 9 x

See help page ?last_name.

Regarding initialization of names: Any name's initial value is just the name itself, or, if you prefer, its address. The use of names with no other value than themselves is fundamental to Maple programming. 

@John2020 You're welcome. You could show your appreciation by giving the Answer a Vote Up by clicking on the thumb icon in the upper right corner. 

Do you want the result to be b?

@RohanKarthik The extraction of specific terms as you described can be done by

select(t-> abs(degree(t,x)-degree(t,y)) < 2, expand(Domineering(5,5,x,y)));

To execute the code in an execution group, simply hit return. Using Startup Code is not a convenient method.

By the way, here's a note on English usage, if you're interested: The correct usage is I have one more question. A doubt is a lack of complete confidence in the truth of a specific piece of information. A question is a request for information, whether general or specific. Help, as a noun, is almost always uncountable, so it can't be modified by one or or used as a plural. It would be correct to say I need more help or even I need help once more, but not I need one more help. (Notice that the adverbial form of one is once, and more is the same whether it's an adjective or an adverb.)

@Scot Gould 

1. The commands upperbound and lowerbound already exist. They are top-level, not part of any package.

2. `if` can be replaced with ifelse. However, the back quotes are a fundamental part of Maple syntax, and numerous other cases where they're used can't be so easily replaced.

@Scot Gould It should unquestionably be a set. It was just a typo on my part. There have not been any changes in this syntax. 

I fixed that in my code.

@RohanKarthik You can now "vote up" Answers by clicking on the thumb rather than the Best-Answer cup. Unlike Best Answer, any number of Answers can receive a Vote Up.

@Joe Riel You're right, and I had just removed that before I saw your Reply. It was a leftover from when I was debugging the procedure that slipped through the cracks. I don't use rtable_scanblock often enough to have memorized the more-obtuse details of its syntax. In particular, I had the arguments of the internal procedure in the wrong order.

 

@acer I don't think that this has anything to do with LinearAlgebra[Generic]. The theorem is using ordinary arithmetic of matrices of bivariate polynomials to generate a single bivariate polynomial. To see such a polynomial, run the example from my Answer.

I'd guess that Domineering is an abstract board game.

@acer Thanks for the testing. A condition satisfied by many (most?) banded coefficient matrices used in practice for the numerical solution of PDEs is strict diagonal dominance (i.e., the magnitude of the diagonal entry in each row is greater than the sum of the magnitudes of the other entries in the row). I suspect that any examples of ill-conditioning (such as the appearance of Float(infinity) in the solution) that arose in your testing came from coefficient matrices without this property. I suspect that the LAPACK code makes some adjustments when this condition is not satisfied. My code does not. Of course, it's my fault for not checking that and not having mentioned it earlier. It was on my mind as I wrote that code that the division by the diagonal entries was potentially problematic.

 

@acer That's a great Answer with information of wide applicability. Vote up.

First 208 209 210 211 212 213 214 Last Page 210 of 708