Joe Riel

9530 Reputation

23 Badges

20 years, 24 days

MaplePrimes Activity


These are answers submitted by Joe Riel

I don't believe this is possible from the Maple worksheet (GUI). You can use command-line maple.

A superior alternative to either is to use the Emacs Maple debugger, the latest version of which is now at my github site, however, that requires a bit of work to install, configure, and learn.

Yes, I actively update maplev-mode.  A newer version is on github, however, I really need to push the latest, which is at 2.31. Multiline comments have been supported pretty much since they were introduced in Maple.

I recommend upgrading Emacs, preferably to 24.4, which is what I'm now using, though I've only recently switched so the released versions of maplev-mode will work with 23.4.

You can copy the code and paste it into the code region in a Modelica Custom Component Template. You can then edit it there and save it as a custom component.

One way is to attach it to a fixed frame that has a specified direction, set either via Euler angles or a rotation matrix. The prismatic joint's direction is relative to the orientation of the fixed frame

For this particular model, the easy way to do what you want is to attach a probe to the output of the constant torque driver; it is turning the revolute joint, so the angle there is monotonic and equals, mod 2*Pi, the periodic signal you are seeing.

Just do op([2,i,2], ifactors(n))

As a general rule you should not be using % inside a Maple procedure.  Also, to access the i-th element of a list, you should not first convert it to a sequence, which is what your assignment a := op(%) is trying to do. Just access it directly. For example

a := ifactors(n)[2];
b := a[i];
c := b[2];

The approach I suggested combines all the subelement selections into one call to op. For example, op([1,2,3], ... ) means select the third operand of the second operand of the first operand of the second argument (not shown here) to op.

A useful answer, without some context, is hard to come by. Is this a question about Maple?

How do you want the component to behave?  You could add a hard stop in parallel with the spring to prevent it from compressing to zero.

Unless the integral is zero over the interval, there is no reason to expect that the integral values should match at the end points.

One way to find the answer is to enter a floating point, right click on the output. The context sensitive menu includes a Conversions menu which includes rational and exact rational.  Selecting either one enters the appropriate command in an input section.

You could declare them as exports.  Because the module has option package, they will be automatically protected.

What are you hoping to accomplish?  Is this for math input, or purely notational?  In 2D math I can type a^~, which generates an a with a tilde superscript and is parsed as an inert form: `#msup(mi("a"),mo("˜"))`.  

A likely cause is that you were not comparing the numbers directly, but rather as part of a larger structure.  For example

evalb( 20 = 20. );
                              true
evalb( [20] = [20.] );
                              false

For this you could use verify

verify([20], [20.], list);
                                      true

 

A standard matrix representation of a state-space system, which is what DynamicSystems uses, cannot represent the derivative of an input signal. It could be handled by replacing the derivative with an independent signal, call it du(t), but then you would have to supply two inputs, u(t) and du(t).  The transfer function form can handle this, though it could (not in this case) result in one with an improper transfer function. A system with an improper transfer function (degree of numerator greater than degree of denominator) cannot be converted to a state-space system.

The conversion to a state-space system could be modified to use the Transfer Function approach if a direct conversion fails; some of the routines in DynamicSystems already do this. 

Try using LibraryTools:-Save to save the package.  It should be saved to a .mla file, not a .m file. You should be able to do something like

LibraryTools:-Save('HINHHOC9', cat(url, "/HINHHOC9.mla"));

 You'll want to delete the HINHHOC9.m file that you previously created.

 

NOTE: Save (not SaveLib) is the procedure you want. Fixed example.

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