acer

32333 Reputation

29 Badges

19 years, 323 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

One calls CurveFitting:-Spline in order to get a continuous piecewise object. The continuous nature of the resulting piecewise object is not (currently) retained knowledge, and so the burden lies on the user to pass that on (as an option to int, say).

But what if CurveFitting:-Spline were to place 'continuous' as an attribute on the returned piecewise object. If that were so, then int or discont or evalf/Int might detect it and benefit.

That could take the burden off of the user to pass along the knowledge. It would be cheaper than having discont try and discover continuity, even if it did so by cleverly examining the conditions for overlap/touching and checking matched evaluated values.

acer

One calls CurveFitting:-Spline in order to get a continuous piecewise object. The continuous nature of the resulting piecewise object is not (currently) retained knowledge, and so the burden lies on the user to pass that on (as an option to int, say).

But what if CurveFitting:-Spline were to place 'continuous' as an attribute on the returned piecewise object. If that were so, then int or discont or evalf/Int might detect it and benefit.

That could take the burden off of the user to pass along the knowledge. It would be cheaper than having discont try and discover continuity, even if it did so by cleverly examining the conditions for overlap/touching and checking matched evaluated values.

acer

He might even mean that he pressed (entered) the <Return> or <Enter> key in the block that defined the proc. Right, that would be the moment when a quote-mismatch error message would get displayed.

acer

He might even mean that he pressed (entered) the <Return> or <Enter> key in the block that defined the proc. Right, that would be the moment when a quote-mismatch error message would get displayed.

acer

The leaf of the acer palmatum (irohamomiji) could inspire a refreshing change for a new logo for Maple.

The leaf of the acer palmatum (irohamomiji) could inspire a refreshing change for a new logo for Maple.

This comes up repeatedly. There have been earlier threads addressing it, here and here say.

I am not completely satisfied with Doug's suggestion above, where MyCos(50) would return the global cos(50) since that result would get interpreted in terms of radians if subsequently evalf'd.

It might be useful if someone with sufficient expertise could roll together a package that did as much as can be currently accomplished (filling in for all trig and inverse trig where possible, giving desirable output in both 1D and 2D even when returning unevaluated, etc, etc). Basically, a citable "final word" with current mechanisms. Such a package could be based on the best techniques already suggested in the related subthreads.

Accompanying such a package might be notes explaining that the package is for "interactive" use and is not a modal switch for all of Maple; trig calls returned from other Library routines would still be in terms of radians. Any other currently unresolvable issues could be noted.

Of course, Doug's comments about learning about and using radians -- as a recommended course of action -- might still apply.

acer

I advise not using Units[Natural]. Too many symbols are taken to be units, so that environment has practically no single-character symbols left for general use.

In your example, you probably intended `t` to be a free variable, while `deg` stood for Unit(degree). But under Units[Natural], `t` means tonne.

> with(Units[Natural]):

> t+kg;
                                   1001 [kg]

And that's why the exported `sin` routine choked, because it thought it was getting tonne*degree and not `t`*degree.

In the following solutions, _Z1 means "any integer".

> solve(sin(x*Pi/180)=0,AllSolutions);
                                   180 _Z1~

> restart:
> with(Units[Standard]):
> solve(sin(x*Unit(deg))=0,AllSolutions);
                                   180 _Z1~

> restart:
> with(Units[Natural]):
> solve(sin(tt*deg)=0,AllSolutions);
                                   180 _Z1~

acer

I advise not using Units[Natural]. Too many symbols are taken to be units, so that environment has practically no single-character symbols left for general use.

In your example, you probably intended `t` to be a free variable, while `deg` stood for Unit(degree). But under Units[Natural], `t` means tonne.

> with(Units[Natural]):

> t+kg;
                                   1001 [kg]

And that's why the exported `sin` routine choked, because it thought it was getting tonne*degree and not `t`*degree.

In the following solutions, _Z1 means "any integer".

> solve(sin(x*Pi/180)=0,AllSolutions);
                                   180 _Z1~

> restart:
> with(Units[Standard]):
> solve(sin(x*Unit(deg))=0,AllSolutions);
                                   180 _Z1~

> restart:
> with(Units[Natural]):
> solve(sin(tt*deg)=0,AllSolutions);
                                   180 _Z1~

acer

"Changing" a list to a set is a very different sort of operation. It is a (generally non-reversible) change in not only data-structure but in the data itself (ie. uniquification and re-ordering).

Changing an rtable from one form to another (Vector[row] to Vector[column], or Matrix to/from Array, or other more exotic changes) can be considered as quite different. It can preserve the underlying data (stored in a contiguous rectangular array of memory) and merely alter the named structure which controls how elements are accessed. In what sense do the associated types then match "static" in the sense cited?

acer

You appear to have misunderstood my meaning.

I meant that 'Matrix' did not appear to fully fit how you described a static type. The gist was not that `.` behaves differently, but that something of type 'Matrix' could be changed to be something of type 'Array'.

acer

Where you mention the "container" type 'Matrix', you might mean 'rtable' (which, unlike 'Matrix', is in the kernel as a constructor). Consider,

> b := Array(1..2,1..2,[[1,2],[3,4]]);
                                      [1    2]
                                 b := [      ]
                                      [3    4]
 
> b.b; # elementwise
                                   [1     4]
                                   [       ]
                                   [9    16]
 
> rtable_options(b,subtype='Matrix'); # change its type
> b.b;
                                  [ 7    10]
                                  [        ]
                                  [15    22]
 
> rtable_options(b,subtype='Array');
> b.b;
                                   [1     4]
                                   [       ]
                                   [9    16]

acer

I was trying to say that quite a bit of what I see as valuable in Mapleprimes replies aren't actually the answers to the particular question posed in the top of their thread, but rather are side material. That is why I can't quite imagine how having the specific answers to posed specific questions rise to the top will help keep all that ancillary good stuff easily found/organized.

acer

Moving forward to a new question/answer format might be useful.

But I wonder how it might also be possible to mine the first 4 years of Mapleprimes to extract the best code, hint, tips, and solutions that are contained inside the posts and responses. There is a mountain of excellent information already buried in this site.

I would predict that for the foreseeable future the first 4 years' of Mapleprimes content would continue to dwarf whatever new is posted in terms of usefulness and interest, provided that the older material could be easily accessed.

While it's true that a lot of the threads in the forums are simple questions at their inception, the discussions often subsequently branch out. Sometimes the discussions take hard turns. And that is often where the gold lies, not as answers to the original (often mudane or faq'like) questions.

One of the things that I like best about Mapleprimes is that great content (code and knowledge fragments) is availiable without the polish or obscurement of material on the applications center. But such fragments are difficult to collate, which is why I suggested functionality for storing personal site-favourites. Managing browser bookmarks is pretty old-hat. Also, no matter how good any new Search facility is it would be painful to repeat any long search with many matched results, or to have to work harder than necessary to docket side-points of interest found along the way.

In fact, there is now so much great material on this site that it might merit having some single expert wade through and collate it by hand. For example, a book on advanced plotting/graphics techniques could be generated from this site's material alone. Not a dry user-manual sort  of book, but a how-do-I book with motivational examples and lots of The Big Picture.

acer

Change Typesetting level to Extended. Close documents and open a new Worksheet. Run the above code as 1D input in a Worksheet. Then change the trailing colon at the end of the second line to a semicolon, and run it again. For me, in 13.01, the output changes from a sequence of products of pairs of distinct random numbers to a sequence of perfect squares.

That is why it is mysterious and fascinating. The fact that the result is typeset as 2D output affects the actual object that gets created. Whether the 2D output of something entered in 1D is suppressed, or not, affects the object created.

acer

First 478 479 480 481 482 483 484 Last Page 480 of 591