Joe Riel

9590 Reputation

23 Badges

19 years, 140 days

MaplePrimes Activity


These are answers submitted by Joe Riel

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

mdc("foo:-foo1:-foo2"):
foo:-main_entry();

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.

Because s is a global, it won't use the local values passed to x and y as parameters. You could workaround that by doing

si := proc(x,y) 
    if R < x^2+y^2 then
        eval(s, [':-x'=x, ':-y'=y]);
    else
       ...
    end if;
end proc:

Any O/S tool that can search for a string in files will suffice. If all the worksheets are in one directory you could do, say, 

grep VariationalCalculus *.mw

If they are in different directories you could use a find or locate facility. However, I suspect that if you had these tools you would probably already have used them.

Use the form of savelib that specifies the archive. For example

savelib('Plotter',"plotter.mla");

The simple reason is that it does so, by design.  Probably it would be useful to have an option that prevents that. Why do you need the second form?

One approach is

Plots:-PointPlot([[seq([t,R(t)], t=500..5000)]);

Why are you using matrix rather than Matrix?  Here's how I do that with a Matrix; I believe a similar form is doable with matrix.

 Matrix(3, (i,j) -> cat(s,i,j)/cat(x,j));

The reason that doesn't work is that the two matrices are different. Each invocation of Matrix creates a distinct matrix. Similarly for Vectors and all mutable elements.  A mutable element is a structure whose content can be modified without creating an entirely new element. 

The part that I'm finding strange is that you seem to have an algebraic expression with Matrices as elements.  That's a bit strange, as a Maple expression. Could you give a simplified example of what you are dealing with?

Kitonum's response gets the job done. An extension to this question, which the user should consider, is how to do the same thing in three dimensions.  From the given response, one might expect that the natural extension would be

plot([xt,yt,zt,t=0..1]);

where xt, yt, and zt are the x, y, and z algebraic expressions of t. Alas, that won't work. There are two problems with it. First, the proper command for a 3D plot is plot3d, not plot. Second, the same parametric notation used for a 2D curve does not work in 3D. The usual way to do this is to use the plots:-spacecurve command:

plots:-spacecurve([xt,yt,zt], t=0..1);

plot3d does have a notation for handling parameric surfaces, not curves; see its help page for details

First 17 18 19 20 21 22 23 Last Page 19 of 114