mmcdara

877 Reputation

13 Badges

3 years, 236 days

MaplePrimes Activity


These are questions asked by mmcdara

Hi all, 

Still a new visualisation problem ...
I have two random variables X and Y linked together with a dependency structure named "Gumbel copula" (just a technical stuff, if you prefer replace the bold text by "two correlated gaussian RVs X and Y").

I would like to represent on a same figure:

  • the set {(x[n], y[n]), n=1..N} of a sample of size N drawn from the joint distribution of X and Y
    (a ScatterPlot does this very well, even if I use a plot(..., style =point) in the attached file
     
  • the empirical marginal distribution of X (Histogram), put below the line "y = min({y[n], n=1..N} )" and rotated by 180 degrees
     
  • the empirical marginal distribution of Y (Histogram), put left the line "x = min({x[n], n=1..N} )" and rotated counterclockwise by 90 degrees
     

The attached file gives you two examples.

Ideally, if it's not too much to ask, I would like to have the main axes placed in more adequate locations.
For instance, the option "axes=boxed" reject the axes on the left and bottom boundary of the box which contains the 3 plots (not very astute) ; on the other side the default locations of the axes seem better but one of them "cuts" a histogram ... not very smart.
In fact the position of the axes in the "scatter plot" part is good enough for me and I would like to "add" the two histograms without changing these axes.

Is there a solution to do that (I think I read here a rather close problem where a "zom" of a plot was put within this same plot?) ?
TIA


GumbelCopula.mw

Hi all you out there.

I have an UNSORTED sequence  L of floats with elements in the range [a, b > a].
Let c some number such that c < b.
I want to find the smallest k such that L[k] > c.

This problem is related to the search of the "First Hitting Point" (or "First Passage Time") of a random process.
The attached file provides a notional example.
It contains a procedure named FirstHittingPassage which doesn't satisfies me for it is based on an unsmart  "confusion" between an Array and a list.

Would you have a smarter way to proceed ?

Thanks in advance

FirstHittingTime.mw

 

Hi everybody, 

Here is a piece of a more important worksheet where I need to push the number of Digits farther (Digits:=30:) than the default value.
Nevertheless I don't want to be annoyed by excessively lengthy outputs and I use interface(displayprecision=6).

It seems that the result of an operation which contains only floats is a 6 digits precision number but, as soon as the same operation contains an integer, the displayed precision equals the value of Digits  ???
To be honnest, simpler situations do not exhibit the behaviour shown in the attached file.

Can anyone explain me why I get tho wifferent displays for the quantity names xi__d ? 

As always, great thanks in advance

displayprecision.mw

 

PS : I use Maple 2015.2 on Mac OSX El Capitan

 

Hi guys, 

I always thought matrices (Matrix) and 2D arrays (Array) where different objects in Maple.

In the attached file you will find a few examples of build-in functions which prove that Maple doesn't always check correctly the type of the arguments.

Beyond the questions set in the attached file, is there some tacit and unspoken rule in Maple which considers that Matrix and 2D Array have to be treated equally ?


Thanks for your answers

Matrix_or_Array.mw

Hi everybody,

I use dsolve(..., numeric, events =[...], parameters = [...], range=0..TMAX) to solve a parameterized system of 2 ODEs (unknowns x(t) and v(t)).

The solution over the whole range [0, TMAX] is constructed by assembling partial solutions over adjacent subranges of [0, TMAX].

(please look the attached file and feel free to contact me if you need more details than those given below

There exist two types of solution :

  • Type 1 : trivial solution : for all t in some range [a>=0, b<= TMAX], the solution is x(t)=0 and v(t)=0
  • Type 2 : for all t in some range [b>=0, c<= TMAX] {x(t), v(t)} is the solution of the differential system


The end of the simulation corresponds :

  • either to t=TMAX
  • either to x(t) = CMAX where CMAX is some predefined value for x(t)
     

I use events to manage the two following situations 

  • x(t) = CMAX
  • x(t) = 0 and v(t) < 0 : this is the situation which describes the transition between Type 2 solutution and Type 1 solution


The global solution is constructed by assembling partial solutions over subranges [0, b[1]], [b[1], b[2]], [b[2], b[3]] ... where type 1 solutions "live" in [b[n], b[n+1]] if n is odd and type 2 solutions in  [b[n], b[n+1]] if  n is even.
 
The assembly of the partial solutions doesn't work correctly : I identified the reason but I'm not capable to fix it.
If you look to the red instructions on yellow background you will see they do not return the same answer than the pink instructions (look to the blue outputs over the plot) . 

This is probably due to a very big mistake on my part  but I can't fix it !

Once again, if my explanations are not sufficient or if I'm not enough clear, feel free to ask me any questions you need.

Thanks in advance

 

ParametricDsolve.mw

 



 

First 8 9 10 11 12 13 14 Page 10 of 14