13076 Reputation

29 Badges

11 years, 178 days

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

On stackoverflow.


MaplePrimes Activity

These are replies submitted by acer

That goal is remarkably poor -- insanely so.

@AmusingYeti If A and B are both symmetric then (A.B.A)^t = ((A.B).A)^t = A^t.(A.B)^t = A^t.B^t.A^t = A.B.A .





             color=blue, numpoints=1000,
  plot3d(cos(2*t/m) + cos(2*(t+5)/m),m=1..10,t=-3..3,

  plot3d(cos(2*t/m) + cos(2*(t+5)/m),m=0..1,t=-3..3,

@Alexrazz Oh, I see, you want to generate a "manual" worksheet that shows all the steps with explicit commands? Is that right?

If so then there is Good News. Modern Maple now has commands which allow you to (fully programatically) construct an entire worksheet, including regular Input, Output, inlined plots, etc. You then have a choice of either 1) launching that in a new GUI tab, 2) saving it to a file, or 3) embedding it in the current worksheet in a "Task" region. (In the case 3 the embedded input lines won't be executable directly, as they are not inside embedded components. One could also cut&paste those, though. But in cases 1 and 2 it would be fully ready for normal execution by your end-user.)

It seems to me that this might be more in keeping with your "dream" goal. Let me know because I happen to have quite a bit of experience with using that functionality and I could probably get you started.

@Rajab It's not clear to me by looking at your worksheet what βkp, T⊥p/Tkp, or ωcp are, or how it is supposed to represent "maximum growth rate".

So I would say that it's for you to provide a revision to your worksheet which computes the data for those curves as well as explains which variables represent all those named items.

I suspect that the expectation that someone trying to put together the desired kind of plot is far less likely to see best success, if it requires understanding (even part of) the background science. If you can supply the code which can compute (or at least define) the mathematical quantities then we may be able to help you plot them as desired.

@Rajab What do the solid and dotted curves represent, numerically? They don't seem to match the colors' boundaries (which are contours).

@Alexrazz As far as I know there is no fully programmatic way to update (ie. write to) an existing output region, which seems to be what you've described. 

I know many rare tricks, including how to generate coupled input and output regions, where the former can update the latter. But even that requires keyboard shortcut presses or mouse actions in order to act. However the central difficulty is that a MathContainer is not an input region, and is not equipped to act like one. And neither is a Button. And neither is tied to any output region.

It might be possible to rig up a second MathContainer to echo evaluated output like that. It might even be possible to have it show in blue. And be borderless. But centering the result might not be feasible.

A MathContainer is intended primarily for expressions rather than executable statements, in these regards. It does not have a strong design.

Perhaps this might be a good time to explain your broader goals. It happens often that members here get hung up trying to implement some narrow subtask, whereas it later turns out that their broader goals are possible by largely other means. We may still be able to get something like your goals here.

I'm interested to hear about your project, if you can share. For example you might be trying to implement an Embedded Components based general purpose front-end to the Maple library commands. (I have built such a beast, including plotting output. There were hard parts. I opted for plaintext input and typeset output.)

@Alexrazz I'm sorry, but I'm not sure what you mean by "after" the Expression component.

@vv This explanation seems plausible. If the sum of exact, symbolic terms is kept around then each subsequent instance should be uniquified to that same SUM DAG (even if computed anew). That is to say, the SUM would found already in the internal kernel simplification table.

For example, keeping the SUM DAG from being garbage collected (by virtue of the reference to it from S),

for i from 1 to 10 do
end do;

Also interesting (to me at least), using 64bit Maple 2016 on Windows 7:

add(sin(k),k=1..25): # 25 might be a behavioral threshold
           sin(1), sin(3), sin(4), sin(5), sin(2), sin(6), sin(7)
           sin(1), sin(3), sin(4), sin(5), sin(2), sin(6), sin(7)

In case the body of the message is once again deleted, here is the original:

Meanwhile, thank you so much for everything.
I know I'm asking a lot but if you have time, you can help me do this?

Building a system of interactive components that, taken a function, two points 'a' and 'b' values ​​and an integer n, the calculations point between a and b in which the function assumes the minimum value by using the following procedure:

• It divides the values ​​between a and b into n equal parts (these will distance the one with the other (b-n)/2);
• calculates the function in each of these points;
• located between these values,  what is the minimum (in case of a tie, take the one closest to a)

I think i have to create a vector for each  part and  prehaps with a fcycle for, calculate the function, finelly i'll use minimize with all function.
Do you think is the correct procedure? If yes, how can I do it?


Here are two ways. (I have opted for simplicity over efficiency.)

Note that they appear the same in the actual Maple 2016 GUI. The first one looks different below because this site's backend engine is old and doesn't render style=pointline properly.



for i from 1 to 8 do
   B[i,2] := log(B[i,2]):
   B[i,4] := log(B[i,4]):
   B[i,6] := log(B[i,6]):
end do:

# One way, motivated because the legend items for style=pointline
# show just a line.

plot([B[.., [1, 2]], B[1..1, [1, 2]],
      B[.., [3, 4]], B[1..1, [3, 4]],
      B[.., [5, 6]], B[1..1, [5, 6]]],
     legend = ["", TSDM,
               "", FESDIRK4,
               "", ESDIRK4],
     colour = [blue, blue, green, green, red, red],
     style = [pointline, point, pointline, point, pointline, point],
     symbol = [solidcircle, solidcircle, diamond, diamond, box, box],
     symbolsize = 10,
     size = [500,500],
     axis = [gridlines = [colour = green, majorlines = 2, linestyle = dot]]);

# Another way is just to do all the points in style=line,
# and all the points in style=point. It's similar.
# This is what you'd have to do in old versions that didn't
# have style=pointline.

plot([B[.., [1, 2]], B[.., [1, 2]],
      B[.., [3, 4]], B[.., [3, 4]],
      B[.., [5, 6]], B[.., [5, 6]]],
     legend = ["", TSDM,
               "", FESDIRK4,
               "", ESDIRK4],
     colour = [blue, blue, green, green, red, red],
     style = [line, point, line, point, line, point],
     symbol = [solidcircle, solidcircle, diamond, diamond, box, box],
     symbolsize = 10,
     size = [500,500],
     axis = [gridlines = [colour = green, majorlines = 2, linestyle = dot]]);




People who have seen it are prevented by nondisclosure agreements/clauses from describing its features.

Since this is close to the time of year when Maplesoft traditionally announces new major versions of Maple then I would say it's far too late to make suggestions for significant new features or enhancements to Maple 2017. But it might be a good time to start making suggestions about Maple 2018.

My strong preference on platform is 64bit Linux for modern Maple, followed by 64bit Windows 7. I base that on reasonably extensive performance investigations combined with stability. By far my last choice of platform for modern Maple is now 32bit Windows (of any numbered release).

@mehdibaghaee Upon  arriving home I discovered that I actually possess the book that I mention, by Higham.

For the general nonsymmetric Matrix it suggests two choices for computing the principal square root: one using a Schur decomposition (which Maple should do quickly as its already implemented as a single CLAPACK call), and the other using an iterated Newton approach (which is simple in that it consists mostly of matrix multiplication and powering, but to be efficient the in-place workspace Matrices might need care).

But for the symmetric-definite case the Schur decomposition approach boils down to something much simpler. Namely, do the spectral decomposition A=QDQ* (D being diagonal from lambda[i] and Q unitary) and then just compute sqrt(A) as Q.diag(sqrt(lambda[i])).Q* . Higham details a few other approaches, but this seems enough to start with.

It's the start of March break. I'll let you know when get a bit of time for it. How fast do you expect it to be, roughly, for say cases 200x200 and 1000x1000?

@mehdibaghaee The mathematics behind efficient floating-point computation of various "Matrix Functions" is quite specialized. Maple has a somewhat efficient and specialized routine for computing the "Matrix exponential" for real float Matrices, but that's about it. Nick Higham has written a book on the topic, several papers, and even a Matlab toolbox for it. It's quite complicated in general.

I mentioned earlier that Maple uses the (non-free for commercial use, Tom) highly optimized Intel MKL versions of LAPACK and BLAS in order to get competitively performing real float linear system and eigen system solving. And that's what Matlab and Mathematica use too. But Matrix functions are another thing.

Let me repeat a question, though: for what purpose do you need the "square root" of a Matrix. I'm interested to know, because it doesn't come up that often. Much more common are, say the Cholesky or LDL decompositions (which are covered by LAPACK).

I could also mention, regarding Tom's comments, that another reason people like to access things like LAPACK and BLAS from within the Three M's commerical products is that those products provide interactive, rich, and interpreted environments, with no need for repeatedly compiling drivers, accessing additional plotting facilities, etc. So for some people they are one-stop shops, while for others they make for convenient prototyping environments. That's not news.

@abdulganiy Please don't post the same question more than once.

In the actual Maple GUI those three curves appear with pointline style. The only reason they don't do so below is that this site's backend engine is old and out-of-date.

The key thing is that the colors and symbols in the legend match those on the curves (in Maple).



a,b := -2*Pi,2*Pi:


  plot(f1, x=a..b, color=red, legend="",
       style=pointline, symbol=cross, symbolsize=10,
       adaptive=false, numpoints=30),
  plot([[a, eval(f1,x=a)]], color=red, legend=f1,
       style=point, symbol=cross, symbolsize=10),

  plot(f2, x=a..b, color=blue, legend="",
       style=pointline, symbol=box, symbolsize=10,
       adaptive=false, numpoints=30),
  plot([[a, eval(f2,x=a)]], color=blue, legend=f2,
       style=point, symbol=box, symbolsize=10),

  plot(f3, x=a..b, color=green, legend="",
       style=pointline, symbol=solidcircle, symbolsize=10,
       adaptive=false, numpoints=30),
  plot([[a, eval(f3,x=a)]], color=green, legend=f3,
       style=point, symbol=solidcircle, symbolsize=10),




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