acer

13146 Reputation

29 Badges

11 years, 207 days

On google groups. (comp.soft-sys.math.maple and sci.math.symbolic)

On stackoverflow.

On math.stackexchange.com.

MaplePrimes Activity


These are replies submitted by acer

@sand15athome 

FYI, here are a few examples of things whose functionality relies on those DocumentTools subpackages. Their help-pages may give more of an idea than do the help-pages of just the Layout and Components commands. You might have a glance at some of these commands' help-pages. Some of these commands produce "applications" with which one can subsequently interect, though of course the underlying facilities can also be used to produce merely static results.

- The Explore command
- The DocumentTools:-Tabulate command
- The summarize=embed option to the Hypothesis Testing in the Statistics package
  (see the hypothesis testing output in the help-page  ?updates/Maple2016/Statistics )
- The ImageTools:-Embed command
- The DataSets:-InsertSearchBox command

The DocumentTools:-InsertContent command allows you to "embed" the results into the current worksheet. The DocumentTools:-ContentToString command provides a step with which you can then (instead) save the results directly to a .mw file, or open it in a new GUI tab.

There is a bit more in the example worksheet available via the help-topic examples/ProgrammaticContentGeneration . Even if you do not want to build an involved interactive application you might still be interested in seeing how you can easily add simple controls which (post-insertion) reveal or hide key portions of generated GUI Tables.

@tomleslie I interpreted the OP's last paragraph as meaning that he did not want to presume knowledge of the result (A->C), nor use it (a priori I suppose) to verify implication.

@brian bovril vv's claim is not true. However not all global optimizers have the same overall quality, so DirectSearch is a good suggestion.

@vv The comment about Optimization being only a local solver is not true in the univariate  case (which this is).

@Joe Riel For such a univariate problem the option method=branchandbound will instruct the Optimization:-Maximize (or Minimize) command to try and find the global optimum.

Of course there is no numeric global optimization application (within or without Maple) that will find the global optimal for all tough examples, using default options. That is true of DirectSearch, univariate branchandbound in Optimization, Maple's newer GlobalOptimization with its 3rd party Optimus engine, Maple's older GlobalOptimization with Janis Pinter's LGO as 3rd party engine, or anything else in the world.

@John May 

I don't know how robust it is, but some part of dimension checking seems available in the type-check.
restart;
kernelopts(version);

         Maple 18.02, X86 64 LINUX, Oct 20 2014, Build ID 991181

f := proc( M::Matrix(2,3) ) "hey"; end proc:

f( Matrix([[a,b,c],[d,e,f]]) );

                                  "hey"

f( Matrix([[a,b],[d,e]]) );

Error, invalid input: f expects its 1st argument, M, to be of type
 Matrix(2,3), but received Matrix(2, 2, [[...],[...]],datatype = anything)

@Joe Riel By supplying the option compact=false the IdentityMatrix constructor returns a Matrix without a restrictive indexing function. Eg,

M:=LinearAlgebra:-IdentityMatrix(5,compact=false);
M[3,2]:=U:
M;

The OP may also be interested to know that the default value of a Matrix entry is 0. So if constructing an identity Matrix by explicit looping then only one level of looping is needed (ie. to walk only the diagonal enties).

I could mention that another alternative is to use a smaller number of points when calling odeplot. Or make multiple calls to odeplot (with a smaller number of points) and then use plots:-display to stitch them together.

example_clipping_2.mw

It's not clear that you understand the difference between,

forifrom1tondo 

and,

for i from 1 to n do

I'm just guessing, but it's also possible that he has created a Document (or Worksheet with 2D Math input) and now wants to export all the input commands to 1D Maple notation.

If that were the case then one possibility is to use Maple's main menubar File->Export As... and then in the popup toggling the Files of Type drop-menu to be Maple Input (.mpl) . Another possibility in that case, in Maple 2016.2, is to use the undocumented Maple command Worksheet:-WorksheetToMapleText which accepts the .mw filename as a string.

@ZWang I suspect that your task may be achievable by using the exact DE system and the IterativeMaps package (rather than trying to use numeric points generated by DEtools or dsolve/numeric).

One of the issues is that maple's performance with rendering or exporting high density point plots is very weak. In contrast ist handling of images is much better. Trying to convert numeric points to an "image" (float[8] Array) seems like the long slow way to me. Better I think to generate such and image with a tool designed for just that task.

Have you tried the Bifurcation command?

It's worth noting that the submitter gives no details as to the domain of the problem (floats, exact rationals, etc), appears uninterested in the limitations to answering this which are purely theoretical (mathematical) rather than limitations of Maple or other CAS). Also, in several previous threads (some of which duplicate the essential topic) the submitter has been in no way forthcoming with details, or responsive to queries for details.

At this point it hardly matters much whether the submitter simply does not understand the mathematical implications, or it unwilling to consider advice or respond to requests for fundamental clarification, or is just some kind of spamming shill.

 

The OP has now asked this same question (or what are essential varients of it) multiple times. It's not clear whether the submitter understands why the general problem is not solvable explicitly (on mathematical grounds, not as a CAS limitation). It's also evident that the submitter is not open to solutions involving numeric approximants (nor understands what use those might be).

What is clear, however, is that the submitter is not open to sensible dialogue about this topic. The multiple posts have now become meaningless spam.

@mehdibaghaee There are solid reasons why CodeGeneration is intended to work on multiple expressions in the context of a procedure. The effects of previous statements, and the type information that can be gleaned on a pass through a procedure, can be useful or necessary information for successful code translation.

For that reason alone I don't think that you're going to see much success even if you were to export the worksheet to plaintext (.mpl) format and try and apply CodeGeneration to top-level statements individually. (I'd also expect wrapping such an export in one big proc()...end proc to not fare well, even as a hail-Mary throw.)

If you have a worksheet with 3000 top-level statements then you already have growing problems with program flow-control. (I support that claim partially with the fact that you've also asked recently how to auto-execute whole worksheets without auto-expansion of subsections. And there are hints that your approach to programming with Maple is lacking useful structure.)

Furthermore, I hope you realize that only a specific subset of Maple command calls can be translated. Mostly those relate to low-level operations (usually within a purely numeric context). I've see some LinearAlgebra references in your previous questions, so it may be worth noting that calls to commands even in that package are not generally supported for translation to Matlab. (I have long wanted to add a so-called extension to CodeGeneration which did that, but there are difficulties even with basic things like the handling of 'Matrix' type-checks.) Even a call to the Matrix constructor using dimensions n, where n is previously assigned, can be problematic.

Have you considered placing key computational portions of your code into procedures? There are other benefits for doing so, apart from just code translation.

@sand15 Right, the knowledge that such case-splitting can sometimes lead to verification is useful knowledge. I tried it because I'd seen that kind of thing before.

But since that didn't lead me to a fully programmatic (and straightforward) way to establish the result using only the assume/assuming/is/coulditbe facilities its usefulness is limited. The negative significance is the need for the extra, manual application.

I had found that solve could be used instead, but then noticed that John had already mentioned it.

1 2 3 4 5 6 7 Last Page 1 of 306