Joe Riel

9660 Reputation

23 Badges

20 years, 3 days

MaplePrimes Activity


These are replies submitted by Joe Riel

@kfli Consider profiling the procedure to determine where time is being spent. This can be done with the commands in the CodeTools:-Profile module, but I generally use some lower level commands:

debugopts('traceproc'=AndersonAcceleration):
AndersonAcceleration(2,phix,X):
printf("%s", debugopts('procdump'=AndersonAcceleration)):

That will print a table that shows each line of the procedure, how much Maple time it spent in it, and the memory used/allocated. Depending on the procedure, the real time might be more useful, you can see it by first executing debugopts('tracerealtime' = true) [that's a relatively new option, so you'll need current Maple].

@bliengme What version of Maple are you using?  It works here (Maple 2018):


(**) Round := (x,n) -> parse(sprintf("%.*f",n,x)):                                                                                    
(**) Round(2.3,3);                                                                                                                      
                                                  2.300

@acer I should probably make my ect (embedded component toolbox) shell script available; it's useful for stuff like this. It will list all the embedded components in a worksheet, and has facilities for renaming and editing them.  It's a bit crude and can, if wielded unwisely, corrupt a worksheet. 

@lucaud I apologize, but do not understand what you are asking.

@lucaud In the loop on the left the current and voltage are not zero.  In the loop on the right, which consists of just an inductor that is shorted out, the current will remain at whatever the initial current is in the inductor. You can force the initial current to a particular value by selecting the inductor, then setting i0 to the value and selecting the "enforce" circle to the left of the value.

Are you expecting the current in the loop on the left to induce a voltage in the one on the right?

@lucaud You'll have to be clearer.  What do you expect the circuit to do?  So far as the probes go, it appears you have created a bunch of plot windows; probably they should all be deleted.  That can be done by selecting them all in the left panel of the plot viewer and pressing the delete key. The remaining window, which cannot be deleted, is called Probe Plots.  Double click it (in the left pane) to have the actual window appear in the plot viewer.  Running the simulation (click the execute button in the main window) causes the plots to appear. 

What are you asking?  Do you want to magnetically couple the two loops?

@acer Good point.  A further clarification for the OP.  Round parentheses used for indexing rtables (of which Matrices, Arrays, and Vectors are special cases) are called programmer's indices. See the help page rtable_indexing for details. For clarity it's probably best to use square brackets for indexing unless you specifically want to use programmer's indexes. Note that because "function application" distributes, if the "function" is actually an rtable, it may be accessed with programmer's indices: 

A := Array(-1..3, i->i):
[x, A](1);
         [x(1), -1];

@Carl Love There should be a link to that procedure from the ithprime help page.  I'll submit a change request.

@Nicklas369 So what key is broken?  Remapping a modifier key is common enough that it shouldn't be hard.  

I don't believe Maple has any such facility.  Are you on Windows?  On Linux I'd remap the keyboard (at the O/S level, independent of Maple) to replace the key with another; I don't know whether that is doable on Windows.  

@Markiyan Hirnyk Maybe hit it with an eval? I may have R4 on a floppy...  You could do zip(`*`, L1, L1).

 If speed were a concern, seq is generally faster than map, even with a builtin, however, I doubt that would be an issue.

L2 := [seq(k^2, k=L1)]:

Offhand, I cannot say. If you email me the relevant msim (or post it here) I'll look at it and respond.  

Per your previous post I've updated the CustomComponent template to allow a real port name to match the signal name, so the next release of MapleSim will include that feature.

@Mariusz Iwaniuk The first invocation isn't quite right, the op(1, .) is doing nothing. A nicer way to use seq is to use the collection as the rhs of the second argument, so the value of the "index" is an equation rather than integer:

{seq(rhs(eq), eq=L)};

The simplest way is

rhs~(L)

A nit. What you have is a set, not a list. Duplicates cannot exist in a set, and order is generally not significant. If you use map(rhs, L) to extract the elements, you could end up with a one element set if b and f were identical (same value) or the order could be different from expected. That's partially why acer (below) also suggested using eval. 

First 25 26 27 28 29 30 31 Last Page 27 of 195