Joe Riel

9660 Reputation

23 Badges

20 years, 14 days

MaplePrimes Activity


These are replies submitted by Joe Riel

Thanks.  I suspected as much, but that form doesn't appear on the main ?plot page.

It seems a trifle strange that a Matrix works but not a two-dimensional Array (it plots, but not what is expected).  An Array is a more natural structure to hold data---Matrices seem better suited for LinearAlgebra operations. 

Presumably not.  I guess the rules are different for these posts. It is possible to edit a blog entry after someone has responded to it.

Presumably not.  I guess the rules are different for these posts. It is possible to edit a blog entry after someone has responded to it.

I'm not familar with the term "suspension points," do you mean an ellipsis (...)?  What do you hope to achieve with this?  It is purely a visual effect?  Or is Maple supposed to do something with it?

I'm not familar with the term "suspension points," do you mean an ellipsis (...)?  What do you hope to achieve with this?  It is purely a visual effect?  Or is Maple supposed to do something with it?

I do not understand questions 1 and 2. 

For question 3, you can use Alt-F-C to close a document.

I do not understand questions 1 and 2. 

For question 3, you can use Alt-F-C to close a document.

When you, the owner of the post, view it, you should see two "buttons" to the right of the title, labeled View and Edit. Clicking the Edit button will allow you to edit the post. You need to be logged into the site. The location of these buttons depends on the type of the post. For this response they appeared below the title, in the title bar (as a responder I am allowed to edit my response so long as no one has responded to it).

When you, the owner of the post, view it, you should see two "buttons" to the right of the title, labeled View and Edit. Clicking the Edit button will allow you to edit the post. You need to be logged into the site. The location of these buttons depends on the type of the post. For this response they appeared below the title, in the title bar (as a responder I am allowed to edit my response so long as no one has responded to it).

That should be relatively simple to add.  Thanks.

You are close.  The problem is that you are specifying two dimensions for the Array.  Try

t := 2:
Array(0..t, i -> <i,0>);

You are close.  The problem is that you are specifying two dimensions for the Array.  Try

t := 2:
Array(0..t, i -> <i,0>);

To avoid hijacking another poster's blog, I'll hijack my own. Peripherally related to the above is a small package I occasionally dabble with that can create minimal covers of Maple types and print a tree-like representation.  As Jakubi suggested (in the aforementioned thread), it can be used to show Maple's type structure. For example:

with(WhatType):
cov := MinCover(GetTypes()):
tree := MakeTree(cov):
PrintTree(tree, polynom);
polynom
    constant
        finite
            cx_zero
            numeric
                negzero
                poszero
        infinity
            cx_infinity
            real_infinity
                neg_infinity
                pos_infinity
        radalgnum
            algnum
                rational
                    fraction
            radnum
                radnumext
    cubic
    expanded
    linear
        name
            symbol
                `global`
                    mathfunc
                    truefalse
                `local`
                protected
    monomial
    quadratic
    quartic

The do loop,

for t from 0 to 10 do  
  f := t-> {op(L2[t+1,..][..,2..3])}:
end do:

isn't doing anything.  Well, it is, it just keeps reassigning f the same function.  It is equivalent to the single line

f := t-> {op(L2[t+1,..][..,2..3])}:

This is because t is a formal parameter to the procedure, so the t that is the loop variable has no effect. I'm not sure what this is supposed to accomplish.

Note, by the way, that there is nothing inherently wrong, or inefficient, with Maple do-loops. The problem is when they are used to build up a sequence term by term, which is O(n^2).  Even that isn't necessarily a bad thing, it depends how big n gets. 

Rather than calling dsolve each time in getarrows, it should be more efficient to use the initial and parameters options before integrating.  For example,

xdot := diff(x(t),t) = x(t)-y(t):
ydot := diff(y(t),t) = y(t)*(1-x(t)):

integ := dsolve({xdot,ydot,x(0)=0,y(0)=0}
                , numeric
                , 'events' = [[y(t)-y1,'halt'],[x(t)-x1,'halt'],[x(t),'halt']]
                , 'output=procedurelist'
                , 'parameters'=[x1,y1]
               ):

getarrows := proc(x0, y0, T, x1, y1)
local DEsol, tm,j, wl;
global x,y,t,integ;
    _Env_in_maplet := true;
    integ('initial' = [x0,y0]);  # reinitialize
    integ('parameters'=[x1,y1]); # assign parameters
    tm:= floor(subs(integ(T),t));
    seq(subs(integ(j), [x(t), y(t)]), j = 0 .. tm);
end proc:
...
init1 := map2(getarrows, x0, y0, T, xmax, ymax):
...
init2 := map2(getarrows, x0, y0, T, xmax, ymax):
First 105 106 107 108 109 110 111 Last Page 107 of 195