PatrickT

Dr. Patrick T

2153 Reputation

18 Badges

16 years, 138 days

MaplePrimes Activity


These are answers submitted by PatrickT

The Maple Help pages are pretty clear that BrownianMotion can take either a real constant x_0 or a vector of constants X_0, while only the constant x_0 is documented for GeometricBrownianMotion. I don't know if there's a good reason for it or if it's a software "limitation."  If no-one comes forward with a rational explanation, try submitting a software change request (SCR). 

http://www.maplesoft.com/support/help/Maple/view.aspx?path=Dirac

I'm not sure I understand the question. I don't have Maple 14 to check, I'm doing it on Maple 16.

Breaking things down a little for experimentation, I find that the font size in L1 can be controlled.

L1 := plots:-textplot(
  { [.999-.251+.153, -.343, "Borda Count", 'color' = 'navy', 'font' = [Helvetica, bold, 20]]
  , [1.002-.251+.157, -.263, "Antiplurality", 'color' = 'navy', 'font' = [Helvetica, bold, 20]]
  , [1.01-.251+.186, -.503, "Approval Hull", 'color' = 'gray', 'font' = [Helvetica, bold, 20]]
  , [1.02-.251+.179, -.423, "Procedure Line", 'color' = "ForestGreen", 'font' = [Helvetica, bold, 20]]
  , [.9585-.131, -.183, "Plurality", 'color' = 'navy', 'font' = [Helvetica, bold, 20]]
  } ) :
L2 := plottools[point]([.829-.251, -.183], 'color' = 'navy', 'symbolsize' = 12, 'symbol' = soliddiamond)
    , plottools[point]([.829-.251, -.263], 'color' = 'navy', 'symbolsize' = 14, 'symbol' = solidcircle)
    , plottools[point]([.829-.251, -.343], 'color' = 'navy', 'symbolsize' = 12, 'symbol' = solidbox) :
L3 :=  plottools[line]([.82-.251, -.423], [.845-.251, -.423], 'color' = "ForestGreen", 'thickness' = 1 ):
L4 := plottools[polygon]([[.82-.251, .57-1.032-0.42e-1], [.83-.251, -0.42e-1+.59-1.032], [.84-.251, -0.42e-1+.59-1.032], [.85-.251, -0.42e-1+.57-1.032], [.84-.251, -0.42e-1+.55-1.032], [.83-.251, -0.42e-1+.55-1.032]], 'color' = gray ) :

L5 := plottools[line]([.798-.251, -.553], [.798-.251, .896-1.032], 'color' = black, 'thickness' = 2)
    , plottools[line]([.798-.251, .896-1.032], [1.195, .896-1.032], 'color' = black, 'thickness' = 2)
    , plottools[line]([1.195, .896-1.032], [1.195, -.553], 'color' = black, 'thickness' = 2)
    , plottools[line]([1.195, -.553], [.798-.251, -.553], 'color' = black, 'thickness' = 2 ) :
plots:-display([L1,L2,L3,L4,L5], 'scaling' = constrained, 'axes' = none);

 

If you want sizes to be relative, perhaps you want to do something like:

mysize := 20:

L1 := plots:-textplot(
  { [.999-.251+.153, -.343, "Borda Count", 'color' = 'navy', 'font' = [Helvetica, bold, mysize]]
  , [1.002-.251+.157, -.263, "Antiplurality", 'color' = 'navy', 'font' = [Helvetica, bold, mysize]]
  , [1.01-.251+.186, -.503, "Approval Hull", 'color' = 'gray', 'font' = [Helvetica, bold, mysize]]
  , [1.02-.251+.179, -.423, "Procedure Line", 'color' = "ForestGreen", 'font' = [Helvetica, bold, mysize]]
  , [.9585-.131, -.183, "Plurality", 'color' = 'navy', 'font' = [Helvetica, bold, mysize]]
  } ) :

L2 := plottools[point]([.829-.251, -.183], 'color' = 'navy', 'symbolsize' = mysize+2, 'symbol' = soliddiamond)
    , plottools[point]([.829-.251, -.263], 'color' = 'navy', 'symbolsize' = mysize+4, 'symbol' = solidcircle)
    , plottools[point]([.829-.251, -.343], 'color' = 'navy', 'symbolsize' = mysize+2, 'symbol' = solidbox) :

it's usually a good idea to post a minimal working example. The following has worked for me:

 

restart;
t := plots:-textplot( [ [ 1, 0, 'x' ], [ 0, 1, 'y' ] ]
                      , 'font' = [ "times", "roman", 20 ]
                      , 'align' = [ ['above','right'] ]
                    ) :

plots:-display(t);

one approach is to set up "events" that trigger whenever the solution wanders into the wrong space.

What problems did you have with events? Can you post an example?

http://www.maplesoft.com/support/help/Maple/view.aspx?path=dsolve/numeric/Events

You may find this exchange useful:

http://www.mapleprimes.com/questions/125273-Dsolve-Events-How-To-Control-For-A-Sign-Change

with(DEtools);

dfieldplot( diff(y(x), x) = sin(y(x))+cos(x)
  , y(x)
  , x = 0 .. 1
  , y = 0 .. 1
  , 'title' = `Ejemplo 1`
  , 'color' = sin(y)+cos(x)
  , 'arrows' = small
) ;

How about this? It works great for me:

Presized-Plots

I have discovered a way to remove this behaviour, at least for the example given above.

Tools -> Options -> Display -> Typesetting Level -> Extended (instead of: Maple Standard )

A while back, someone showed me how to clean the output, let me copy the procedure here:

Strip := Z -> subsindets( Z, {float}, z -> parse(sprintf("%g",z)) ):

This will fix the redundant 1.

Strip(evalf[3](eval(x2,[a=103/100])));
                                  b
                             -1.03

Note: my internet connection is very unstable today and I can't trace the source of the Strip procedure. I think it was acer who wrote Strip.

EDIT: It was indeed acer (thumbs up) who wrote Strip, in order to strip trailing zeros in a legend.

http://www.mapleprimes.com/questions/126125-How-To-Customize-A-Plot-Legend#comment126166

It may be that you could solve your two systems by setting them up as a single system, and perhaps that would be more accurate than feeding an approximate solution into another system, you might also be able to benefit from compiling (making it a lot faster). The parameter could be declared, which is also the efficient way of dealing with it (if I understand correctly). If you show your problem in full, by copy-pasting the equations in maple 1D input notation, someone may be able to help (I'm willing to try but I'm an amateur myself).

There are some bugs, reported here:

http://www.mapleprimes.com/posts/133651-PS-Driver-In-Maple-16-For-Windows

I have not been able to export my 3D plots to eps with Maple 16. Not sure if my own problems are related to the bug, but I haven't bothered to figure that out, as I figure it would be more efficient to wait for Maple 17. In the meantime I do something like this:

http://www.mapleprimes.com/questions/129009-How-To-Remove-Floatundefined-From

Usually a colon (:) instead of a semi-colon (;) at the end of each line does the trick. But it looks like you have many colons above, so perhaps you want to suppress warnings? Then you can sandwich your code between these:

interface('warnlevel'=0): # suppresses warnings
your code here
interface('warnlevel'=3): # the default setting

Another approach is to set this at the top of your worksheet (hat tip Joe Riel who showed me the trick a while back)

_Env_in_maplet := true:

The Finance package has useful things. (It may need a recent version of Maple)

http://www.maplesoft.com/support/help/Maple/view.aspx?path=Finance/WienerProcess
http://www.maplesoft.com/support/help/Maple/view.aspx?path=Finance/GeometricBrownianMotion

This is probably what you were looking for (three years ago!)

to save a procedure named myproc:

save myproc, "mysavedproc.m";

to retrieve it:

read "mysavedproc.m";

http://www.maplesoft.com/support/help/Maple/view.aspx?path=save

http://www.maplesoft.com/support/help/Maple/view.aspx?path=read

Does this thread contain anything useful for your case?

http://www.mapleprimes.com/questions/119852-Order-Of-Eigenvalues-In-LinearAlgebra

1 2 3 4 5 6 7 Last Page 3 of 24