Joe Riel

9530 Reputation

23 Badges

20 years, 26 days

MaplePrimes Activity


These are answers submitted by Joe Riel

What sort of plot are you trying to create? Maple raises an error because the plot command does not recognize that list as valid input. It isn't clear what you want. Why do the ranges have zero measure?

A statement that raises an error doesn't return the error as a string.  It is possible to use ?traperror, a deprecated procedure, to return the string. The preferred method, as you know, is to use try/catch. For example

is(traperror(tan((1/2)*Pi)) = "numeric exception: division by zero"); 
                                         true

Note that the string does not include "Error, (in tan)".

I'm investigating this. In the meantime, removing the diodes allows it to simulate.  That should, of course, not be necessary.

There is a bug in the handling of the initial conditions.  I'm submitting an SCR against this.  To work around it, assign initialconditions to the empty list:

initialconditions := []:

Then, after generating the component, edit the Modelica source.  Above the 'equation' statement, add

initial equation
   Tgo = Tgi;
   Two = Twi;

Then click the "Generate Component from Source" button.

While I'm not sure the precise cause (it has to do with Maple commands being used by the GUI itself), to work around it I temporarily unassign print/rtable with

`print/rtable` := NULL:

That will break the display of some rtables, but avoids the problem with stoperror in the GUI. 

It isn't practically possible to maintain a DC voltage across an inductor.  The DC voltage has to be 0. You can add a resistor from the base of the transistor to ground to prevent the simulation problems, but basically you will need to rethink what is being accomplished.

 

You should be able to solve that manually.  When does y^x = 1?

 

Recently I was not able to login with Firefox.  The solution was to clear the cookie for the MaplePrimes site.

The improved debugger has the ability to temporarily patch a procedure.  From the info page for mds:

  1. Stop the debugger in the procedure to be patched.  

  2. Execute `mds-patch' (`P').  This opens a buffer that contains a
     copy of the procedure.

  3. Edit the procedure.  

  4. Execute `mds-patch-install' (`C-c C-p', or use the *Install* entry
     in the *Patch* menu).

  5. Return to the Maple debugger showstat buffer.

  6. Quit the debugger (`q').

  7. Rerun the Maple code.

 

You may have to set kernelopts(opaquemodule=false) to permit access to module locals.  The patch remains in effect until the kernel is restarted.

 

The fourth boundary condition is the problem. Replacing it with

bc[4] := D[3](x)(t,z,0.16e-1)=0;

eliminates the error.  Alas, pdsolve doesn't return a solution.

Hmm.  That isn't quite right.  I had modified the equations slightly before passing to pdsolve:

cond := {bc[1], bc[2], bc[3], bc[4], bc[5]};
sys := cond union {pde[1], pde[2], pde[3], pde[4]};
sys := convert(sys,rational);
pdsolve(sys, [ Y[],Yeq[], X[], Xeq[] ] );

If the call to convert/rational is removed, the previous error reccurs.

The plot needs to be printed.  Do

print(plot3d(...));

 You might want to wrap everything in a try statement and restore plotsetup in a finally clause:

try
    plotsetup('jpeg', ... );
    print(plot3d(...));
finally
    plotsetup('default');
end try;

The ?contourplot command requires that you specify a range for both x and y.  Try

contourplot( ... , x = -1/2..1/2, y = -1/2..1/2, ... )

You have a typo in the second label box:  label("detector radius", ...) should be Label("detector radius",...)

With that fixed it ran.

The simplest approach is to solve this numerically with ?fsolve.

Another approach is to do

eq := 12^x -6^x +6-36/(3^x)=0:
[solve(simplify(eval(eq, x=log[3](y))), y)];
map(y -> log[3](y), %);
 

I'm guessing you typed that in the search box of the help browser.  Just type the command name.  The question mark is used when typing into an input region of a worksheet.

First 42 43 44 45 46 47 48 Last Page 44 of 114