acer

32622 Reputation

29 Badges

20 years, 43 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Arcas Gabriel 

It looks like you have an extra blank space between the minimize and the opening round bracket that follows it.

If you are using the (default) of 2D Math input mode then you should remove that space.

In 2D Input the space indicates implicit multiplication, but what you want is function-application (ie. the command minimize applied to what's inside the round brackets).

Also, let me repeat: the syntax,
  with simplex
is invalid and wrong. It should be,
  with(simplex);

 

 

Sometimes it's useful to take a step back and consider the larger context. (I cannot tell whether the following is applicable in your code...)

Does your other code rely on utilizing all or most of the S_||n at any given time? If not, and if your general process can be looped so that only a subset of the ten S_||n are ever needed at any one time, then you may not need to create them all together, up front.

In such a situation you could create the smaller subset only as needed:
  - You could try unassigning the earlier one's (and successfully forcing gc which can be tricky), so that allocated memory is re-used for the new one(s).
  - Even better you might use the 4th calling sequence described here, where out is a container rtable to be populated. The container could be one of the earlier S_||n rtables/Vectors. In this way you could, each time through the loop, repopulate a fixed, smaller number of S_||n with new random data, without having to worry about the "old ones" being garbage-collected.

 

Just a note regarding the numeric quadrature.

Using Maple 2017.3 on 64bit Linux,

restart; # splitting as described
evalf(IntegrationTools:-Split(Int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)),
                                  t = 0 .. 3/2),[1/2,1]));
                                                0.1560547979 - 1.261993176 I

restart;
evalf(Int(evalc((1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)))),
          t = 0 .. 3/2));
                                                0.1560547979 - 1.261993176 I

restart;
evalf(Int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)),
          t = 1 .. 2-10^(-7), digits = 20, epsilon=1.0e-19));
                                                   -3.1645980460317541096

restart;
evalf(Int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)),
          t = 1 .. 2-10^(-7), digits = 20, epsilon=0.99e-19)); # returns unevaluated
The second to last one above succeeds in Maple 16.02 with epsilon=2.0e-19 but not with epsilon=1.0e-19.

As you may have realized  It is unlikely someone can accurately diagnose and answer your Question 1) without more details. I would stress that complete worksheet and code/data to reproduce the issues are key.

Please add details as Comment to this thread. Please do not duplicate with a completely new Question thread.

Or, for a black and smaller center-dot,

InertForm:-Display( `%.`(A,B), 'inert'=false ) = A.B;

@hpc As I mentioned, the source ffor EmbedAnim resides in the Startup Code Region of the worksheet that I attached.

So that's why it works in the worksheet that I attached. The Maple GUI runs the startup code (if allowed), and that defines EmbedAnim.

Your pasted image shows that EmbedAnim returned unevaluated, which means that in that session EmbedAnim is simply not defined. Your output is just an unevaluated function call to an undefined name.

If you want to run EmbedAnim in some other worksheet/document then you'd have to either 1) copy that source for EmbedAnim into your new worksheet (in its own Startup Code Region, say), or 2) Use LibraryTools to Create a .mla archive and Save it to that, and then put the .mla to some place specified by libname.

Since doing all that is a bother (or difficult for a new user) I mentioned that I could put it into a "package" that Maple 2017 could install straight from the Maple Cloud. Then it would always be directly available.

@_Maxim_ The Question is marked as "Maple 2015", and in that older version Explore was not as capable about evaluating references to assigned names.

This variant seems to work in Maple 2015.

rat_2015.mw

It seems like what you're really trying to do is write a procedure which implements multivariate Newton's method, which you could then export to C++.

You are not going to be able to do that using any call to fsolve. The CodeGeneration mechanisms will not translate that. You have to write the implementation of Newton's method explicitly.

Please stop posting duplicates of this question.

Your system may have swapped out most/all of the memory in use by Maple.

If so then the intermediate expressions may be so large that it's takes ages to swap back in enough to let Maple proceed.

It's often not worthwhile continuing in such cases, as not only is the computation speed much reduced but also the solution is likely too large to be manageable anyway.

ps. You posted several other questions about very large symbolic system solving. It's not clear to me that your last explanation of why you maintain this path (ie. that a purely numeric "on demand" mechanism would not be possible, and that you really intend additional manipulation/computation with what might be enormous symbolic linear system solutions) holds up. 

@Christopher2222 Well, you can programmatically insert/embed a Table with prepopulated Cells, and you can even replace that whole thing at once.

And you can build the Cells using entries from a `table`, say.

But IMO the programming would be far more manageable/feasible with the `table` as the mutable data-structure and the Table handling/updating as more of a high-end display mechanism.

One exception to this is the case where all possible content is known and fixed (in one big Table), and the programming controls only how limited and select portions of Cells are hidden/revealed on the fly.

Another exception would be where all the "content" of all the Cells is in their own respective PlotComponent/DataTable/MathContainer/TextArea embedded components.  That could be problematic if your "descriptions" are a mix of text and typeset math.

GUI Tables are not implemented in a way that they are fully programmatically accessible (like a spreadsheet, say). The only way to represent the "content" of a Table's Cells are as XML.

For example a Table's Cell might contain a Section, or a Document Block, or another Table, etc. 

If you were thinking that a Table Cell would just have a Maple expression like say, x+y , as its content then you'd be mistaken.

Now, there is an (obscure, likely undocumented) streamcall that allows you to access the XML of the whole current worksheet. But programming with that would be insane (IMO).

If you want to keep track of, and program with a Maple structure whose contents are expressions the a mutable data structure like a `table` or an `rtable` would be more appropriate.

@Christopher2222 Doing something like Tabulate for Maple 18 is possible. It's not difficult (if you know how), but it is time-consuming.

Why should someone spend the time on backporting to a release at least 3 years old, especially when there's always lots of worthwhile other things to do moving forwards?

@Christopher2222 Yes this has been possible for several releases now.

You can use the DocumentTools:-Tabulate command as an easy way to do simpler cases.

Or you can use DocumentTools:-Layout:-Table for more general functionality. For that you'd also use other commands from the DocumentTools subpackages `Layout` and `Components`.

The original question didn't make it very clear just what level of post-insertion interaction would be wanted (...if any).

Are you saying that you want to see something with `Diff` ( and 2-argument `eval` ) instead of `D` ?

Why would you post such long question and not upload a worksheet containing the full example?

First 274 275 276 277 278 279 280 Last Page 276 of 596