Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@nm You can define any type whatsoever and give it a simple name with TypeTools:-AddType.

A type match can be made against any subset of the fields, so each procedure should only check for the fields that it uses.

There is no difference between using the single or double quotes when defining the record's fields. But when you're accessing the fields, you can't use the double quotes, nor would any quoting be needed if you use :-

@Carl Love The output of my procedure k1k2 can be efficiently counted into ranges with the command Statistics:-TallyInto:

Statistics:-TallyInto([indices](K1, nolist), [seq(1..10^k, k= 1..7)]);
  [                                                   
  [1. .. 10. = 2, 1. .. 100. = 18, 1. .. 1000. = 131, 

                                         5         
    1. .. 10000. = 1021, 1. .. 1.00000 10  = 8240, 

                     6                            7         ]
    1. .. 1.000000 10  = 69231, 1. .. 1.0000000 10  = 596908]


Statistics:-TallyInto([indices](K2, nolist), [seq(1..10^k, k= 1..7)]);
   [                                                 
   [1. .. 10. = 2, 1. .. 100. = 7, 1. .. 1000. = 37, 

                                         5         
     1. .. 10000. = 208, 1. .. 1.00000 10  = 1352, 

                      6                           7        ]
     1. .. 1.000000 10  = 9267, 1. .. 1.0000000 10  = 67671]


 

@nm Unlike the map and map2 commands, the ~ only maps over lists, sets, tables, and rtables. Other arguments are passed as they are. In this example, A is the only thing that's a list, set, etc.

@acer It was only for pedagogical reasons that I didn't give the "whole story" on implicitplot and grid. I hope it was the right decision.

Yes, the OP does seem resistant, perhaps because they have a textbook which deviates a bit from what we say.

@janhardo Here on MaplePrimes, you have access to the best Maple educators in the world, by far. If what we say seems to deviate from your book, there are three likely (and interconnected) reasons:

  1. We feel that the book's pedagogy is flawed: An example would be the binom procedure that returned its results through an argument rather than directly.
  2. We feel that aspects of Maple that didn't exist at the time that the book was written are easier to learn: An example would be Array(1..3, 1..5, (i,j)-> i^j) rather than filling the Array with loops.
  3. We feel that it's a waste of time to learn archaic or deprecated techniques, such as array (lowercase).

Remember that we want to help you learn Maple. We will guide you through the pedagogical pitfalls of this book, so please trust us if we say that it's not worth doing something a particular way that your book suggests.

@janhardo I have visited DesCartes's house in Leiden, Netherlands. It did not seem to be open to the public. I don't know about a house in Amsterdam also. I've visted Amsterdam twice. My younger stepdaughter is a physical therapist there, and she's even learned Dutch fluently.

@acer Thanks for spotting that, and I've corrected it.

@Scot Gould I've lost sight of the main point of debate here. I thought that you were arguing that Maple had an "inconsistency" that led to a pedagogical flaw. Yet the example that you showed shows Maple working perfectly (in a pedagogical sense also). And, you can do that in both the top-down and bottom-up modes. If you were indeed arguing that there was a pedagogical flaw, then I want you to give an example that highlights that flaw.

You wrote:

  • [C]ould not one devise a system, for which space is allocated, but all evaluation is performed numerically at the last step?

I guess you mean essentially this: Is it possible to write a symbolic system (such as Maple) in a non-symbolic language (such as C, C++, etc.)? Yes, of course it's possible since Maple itself is an example of that. But I think that your conception of what's involved is overly simplistic. If the variables don't have numeric values, you have to internally handle all the algebraic manipulations. You need to put expressions in "normal forms" so that equality can be recognized.

  • If understand the statement in Maple, can you provide an example of a language they are referring to?

Almost all languages in widespread use before 1986 (such as C, C++, Fortran, Pascal, BASIC, Algol, COBOL) have no built-in support for symbolic variables. In those languages, the bottom-up evaluation style must be used.

You specifically mentioned Matlab and Python. As far as I'm aware, both of those languages have some support for symbolic variables. In Matlab, they're call "symms" (I believe). In Python, there's a package sympy. 

@J F Ogilvie The first of your three examples can be done like this:

inttrans:-fourier(
    convert(exp(-a*abs(x))/sqrt(abs(x)), Heaviside), 
    x, s
) assuming a>0;

For the other two examples, I can't get Maple to fully expand them, even by direct integration. But neither are the results incorrect, as was suggested by your original Question. It may be possible to include these in Maple's "known" fourier transforms by using the inttrans:-addtable command.

You may know that the expressions inside the csgns are real, but do you know wheher they are positive or negative?

How can you expect anyone to answer that when you've given no formulas, no code, and no reference material?

@Scot Gould Why do you refer to 2*x + 7 = x^2 + 4*x + 4 as the original equation? The original equation is sqrt(2*x+7) - x - 2 = 0.

@janhardo You can't divide the interval by n-1 if n=1. Acer's `if` is there to treat n=1 as a special case.

@mmcdara The second solution that I gave in my Answer doesn't require DataFrame, will work in Maple 17, and places the row labels on the right. So, there'll be no plot needed.

@Joe Riel According to Stefan's writing above

  • [The bound variable] is quietly implicitly declared local if one wasn't declared

To me, that adequately explains why the protected problem no longer occurs. But it doesn't explain the absence of the assertlevel problem.

@janhardo If e1 and e2 are expressions and c is a condition that evaluates to true or false, then

if c then e1 else e2 fi

is often abbreviated

`if`(c, e1, e2)

First 192 193 194 195 196 197 198 Last Page 194 of 709