acer

32485 Reputation

29 Badges

20 years, 7 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Carl Love I have too. But it's still much better to provide the actual Document. Otherwise it's more difficult to know whether the problem is specific to Maple 2017(.3), possibly one some platform, or typesetting level, etc.

It's possible that the cut&paste of the particular 2D Math to 1D Execution Group (or somewhere else), as an initial step, might be a workaround.

I'd like to see the specifics. It's not a guarantee, but surely it cannot be worse to have the actual problematic Document (possibly with precise details on actions to reproduce the problem).

It is not reasonable to expect the best diagnosis in the absence of your actual Document.

@Lenny You already had a mechanism by which the PlyTable1 data (Matrix) could be available to the procedure, eg. GetDet.

By this I mean that your original attachment already had a DataTable embedded component, whose associated "rtable" was the 2-by-1 Matrix PlyTable1.

Indeed, if I fill in a few values in that DataTable (say, 1.2 for first entry in the only column, and 1.3 in the second entry in the only column) then that Matrix is available from within the procedure (or outside it). And that data survives closing & reopening the Document.

Your original attachment did not work properly after wrapping the code in the proc...end proc as you mentioned (even with some PlyTable1 data entered in the DataTable, since the original attachment lacked such data) because of the reasons I explained in my Answer. You may have coinceidentally fixed/avoided the problem I described, by some other changes to your methodology.

Is this a homework question? If it is, then why not tell us how you think it should be done, and how you'd start going about accomplishing it?

Your method of generating a sequence of data points, and then interpolating that, and then plotting the interpolant, is very inferior to the direct method shown below.

I have deleted at least one duplicate posting of yours, in which you asked about the same inferior method for a very similar examples.

(You have asked duplicates of some other of your query topics, as well. Stop spamming this site with duplicates.)

@AHSAN It is impolite to expect other people to have to type in your equations for you.

@Carl Love No worries, Carl. I assume that we always have purely constructive discourse!

I had assigned the results from GenerateMatrix to A,b two names, then concatenated before calling Modular:-LineasrSolve. Six of one, half a dozen of the other...

I'm glad you took the high road and showed your answer. Upvote. The OP's use of deprecated lowercase matrix, evalm, etc, made me a little sad.

@Carl Love I wasn't sure what the instructor was up to, on that point.

At first I had code using each of Linsolve(...) mod p, LinearAlgebra:-Modular, and even msolve, but figured that using just solve might give the OP something more to think about.

Your Document was last saved in Maple 18, and not Maple 2018 which is four major releases later. I have adjusted the Question header accordingly.

@Carl Love I had only a sneaking suspicion about the "possibility" of speedup. Yes, I was wondering about simplification (once all the exp and arithmetic had been combined on the real&imag parts, split by evalc, code optimized, etc). I was just wondering... 

More hazily, I wasn't outright sure whether I might also save on arithmetic by avoiding extra care for corner cases (reciprocals, etc). Maybe a poor idea. I was just wondering... 

But nothing concrete.

And I was also trying to recollect details of the platform-specifc complex arithmetic bug(s) I'd seen years earlier -- though I didn't mention it earlier because I was trying to, umm, keep it simple.

@Yiannis Galidakis I wrote that "expmap4.mw" worksheet early in the year 2016, for Maple 2015. I didn't write it for Maple 18 (established by the fact that it uses the newer IterativeMaps package).

Here is an adjustment of the first part (just the plot3d), which runs faster in my Maple 18.02 due to explicit use of evalhf which I have added for you.   expmap4_part1_18.02.mw

@emendes Controls for the animation (including a slider) are available in the top menubar when you put the (mouse pointer) focus on the animation.

They are also available by right-click upon the animation. The popup menu offers control buttons (but no slider) under the "Animation" submenu -- usually at the bottom of the popup.

FYI, you could also do this, which embeds a Slider along with the plot:

restart;
with(DynamicSystems):
num:=10*(s+alpha);
den:=s*(s^2+4*s+8);
Explore(RootLocusPlot(NewSystem(subs(alpha=a,num/den)),
                      view=[-10..3,-15..15]),
        parameters=[a=1..10.0],animate);

@Yiannis Galidakis If you look to this old Question thread started by yourself in 2015, I wrote a Reply in which I mentioned that there are (in that version at least) some specific issues with complex arithmetic under Compiler:-Compile. Those might be MS-Windows-64bit specific. (I had a vague recollection of this when putting together the code above -- but I did not unroll the complex arithmetic operations in your code, as I don't have a MS-Windows machine with Maple 18 at hand right now, on which to test.)

By the way, in that old Question thread there was quite a bit of discussion about using evalhf, etc, for acceleration. (That included the kind of simple edits in my original Answer above.)

As I mentioned above, there is no "general" Escape fractal command in Maple 18. It only has a few specific flavours, hard-coded as the exported commands of the Fractals:-EscapeTime subpackage.

In Maple 2015 the IterativeMaps package was added, and its Escape command can be used in some related ways. (It's not clear how I could use it for your orbit checking -- except by intoducing/storing as many variables/values per x-y entry as your N the orbit Vector dimension, and then post-processing...)

Here is a simple "exponential map" example (from about Feb 2016) which compares computation via plot3d (4.4 sec, even under evalhf) and IterativeMaps:-Escape (0.24 sec).  expmap4.mw

Here is a more involved example also using IterativeMaps:-Escape (from about Nov 2015) which has some bells&whistles for the coloring and stopping criteria, and an Explore (re-using the image/Array container).  tetration_escape0.mw

By the way, the "images" (float[8] Arrays) produced in this and the previous code can not only be inserted/displayed in a Worksheet (ImageTools:-Embed) but can also be saved to file (ImageTools:-Write).

Lastly, if your session crashes or acts funny while running any of this multi-threaded code, you might want to check your Task Manager to see if any orphaned kernels ("mserver" process) are still running after you quit the GUI.

This has been asked a few times in the past weeks.

Perhaps the main ?plot Help page should get such an example, that clearly states the purpose. It seems basic enough to warrant a clear and readily available example.

(There is a less clear polar plot example buried in the ?plot,details Help page.)

@Yiannis Galidakis I suspect a problem with the Compiler.

This is the same but with the use of the Compiler removed. It's 3+ times faster than what was in my answer on my quad-core, due to the multithreading.

parTet2_nocompile.mw

ps. This was very quick to write, as I just had to make relatively minor adjustments to previous escape fractal code that was set up almost identically.

If you're going to link to this page then I might dig out another worksheet I already had, that used the IterativeMaps:-Escape for a tetration fractal. (There are choices, in how to utilize the computed data for coloring...)

First 157 158 159 160 161 162 163 Last Page 159 of 594