Joe Riel

7707 Reputation

22 Badges

14 years, 87 days

MaplePrimes Activity

These are answers submitted by Joe Riel

In addition to Carl's suggestions, I think it would be clearer if you used a separate line to extract the rhs of the output of dsolve, when assigning to Y.  That way a reader could see what dsolve returned and would understand the reason for using rhs.


            [a(x), b(x), c(x)]

Arguments applied to a list are distributed to each element in the list. If any elements are lists, the distribution applies to them, as well. Consequently, L2(x) is converted to [[1(x)],[2(x)]].  Arguments applied to a number evaluate to the number, for example 3(x) evaluates to 3.  Your result follows from that.

(**) eq := randpoly(x) = 0;                                                       
                         5       4       3       2
               eq := -7 x  + 22 x  - 55 x  - 94 x  + 87 x - 56 = 0

(**) latex(eq);                                                                   

An explicit example would have been helpful.  How about View > Expand all Sections, which can be done from the keyboard via Alt-v e.

It depends on what you want to do with the saved data (a Vector here).  Access it from some other program?  Save as a spreadsheet?  Access it from another Maple worksheet? 

For the latter you could use the save command:

V := Vector(["a","b","c"]):
save V, "V.mpl":  # save as ascii to file V.mpl in current directory
read "V.mpl":
                                    [   ]
                                    [   ]
               [a, b, c, d, e]

Note that that won't work if the lists were sets. For that you could use subsindets:

S := {{{c, d, e}}, {a, b}}:
{subsindets(S, set, op)};
              {a, b, c, d, e}

Maybe nicer is

map(subsindets, S, set, op);
              {a, b, c, d, e}

Element-wise binary operators act more like zip than map when both sides are containers.  To see this, do

(**) [A,B] minus~ [C,D];
            [A minus C, B minus D]

On the other hand,

(**) [A,B] minus~ C;
            [A minus C, B minus C]

So it is natural to think that your use might work. You could do something ugly like

(**) eval([{1,2},{2,3}] minus~ ''{2}'');                                                       
       [{1}, {3}]

A slightly simpler use of map is

(**) map(`minus`, [{1, 2}, {2, 3}], {2});                                                                                                                                                                        
            [{1}, {3}]

Alas, the current design of odetest expects that integration constants are named with prefix _C.  More accurately, they must match the type

And(symbol, suffixed(_C, nonnegint))

I'm assuming you are using a Maple worksheet (not command-line Maple). 

  1. From the menu, select Format > Styles 
  2. Scroll the styles to P Maple Output (the P indicates the style is a paragraph style)
  3. Click Modify
  4. Select Left in the Alignment drop-down menu
  5. Click OK, etc.

Now your output should be aligned flush left.

Do you have a schematic of the filter?  

If the nonideal opamp is replaced with an ideal opamp, the resulting transfer function is a high pass, which indicates that the rolloff of the original is dependent on the op-amps.  That seems questionable to me.  

If you have access to the source, which you apparently do, just put a DEBUG() statement in the procedure where you want the breakpoint.  If need be, you can always put it inside a conditional so that it is only executed when some desired condition is met. 

By the way, with the Emacs maple debugger, I'd simply do


As Tom indicates, there is a fundamental difference, in Maple, between a global and local (or locally-scoped) variable.  Global variables behave differently in procedures, they fully-evaluate.  Doing so is more expensive and usually not needed. Here is a simple example to illustrate the difference.

(**) proc()
(**) global g;
(**) local  x,y;
(**)     g := y;
(**)     y := x;
(**)     x := 1;
(**)     ('x'=x,'y'=y,'g'=g);
(**) end proc();
                                                     x = 1, y = x, g = 1

Note that the value of g, the only global variable, is 1, not y, while the value of y is x.

The problem is that it latex is using beta as the filename. Maple interprets, for example, (((a,b))), simply as (a,b); the extra parentheses do nothing.  I haven't used latex so don't know how t pass it an expression sequence.

One solution is

subs([6=b, 1/6=1/b], a);

Any procedure whose initial character is the ampersand is a neutral operator (see ?neutral) and can be used with infix notation, as you discovered. The binding strength of a neutral operator is quite high, higher than that of - or + (see ?operators,precedence).  The usual way to handle that, syntactically, is to enclose the arguments of a neutral operator in parentheses,

x ⊕ (-y);

Speculative Addendum It is not entirely clear why  ⊕ is a neutral operator. As an html entity, its representation is "⊕". So while it does have a leading ampersand, it also contains a semicolon, which is not allowed in neutral operators.  Maybe in Math 2D input, where this works, some (or all) html entities are allowed to be neutral operators.

3 4 5 6 7 8 9 Last Page 5 of 100