sand15

705 Reputation

11 Badges

9 years, 12 days

MaplePrimes Activity


These are questions asked by sand15

Here is a notional example of a user defined  Probability Distribution:

  • One of the "attribute" or "property" (sorry but I don't know the correct word to use) in any known distribution (that is already implemented in Maple) is Parameters: an example is  provided for a Gaussian RV.
     
  • In a first stage I define a simple Distribution named MyDist and declare X as a random variable of distribution MyDist.
     
  • Then I decide to complete the definition of MyDist by adding the "property" Parameters.
    I get an error I don't know how to get rid of.

Does anyone has any idea to fix that ?

PS: I browse the Statistics library to try and understand how this "property" is defined for a known distribution but I couldn't find any clue.

Thanks in advance.

restart

with(Statistics):

G := RandomVariable(Normal(a, b)):

attributes(G)[3]:
exports(%);
(attributes(G)[3]):-Parameters;

Conditions, ParentName, Parameters, CharacteristicFunction, CDF, CGF, HodgesLehmann, Mean, Median, MGF, Mode, PDF, RousseeuwCrouxSn, StandardDeviation, Support, Variance, CDFNumeric, QuantileNumeric, RandomSample, RandomSampleSetup, RandomVariate, MaximumLikelihoodEstimate

 

[a, b]

(1)

MyDist := (mu, Sigma) -> Distribution(Mean=mu, Variance=Sigma):

X := RandomVariable(MyDist(m, V));
(Mean, Variance)(X);

_R1

 

m, V

(2)

MyDist := (mu, Sigma) -> Distribution(Mean=mu, Variance=Sigma, Parameters=[mu, Sigma]):

Y := RandomVariable(MyDist(m, V));

Error, (in Statistics:-Distribution) invalid input: too many and/or wrong type of arguments passed to NewDistribution; first unused argument is Parameters = [m, V]

 

m, V

(3)

 

Download RandomVariable_Parameters.mw

I am a newbie in the use of the Physics package.
As I'm interested in modeling dynamic articulated systems, I began reading the example about Mechanics (Statics).

My question is quite simple: let F some vector force of components a * _i and b * _j , what does abs(F) represent? 

I naively thought that abs(F)  was the modulus of F and expected it to be non negative. But I get some negative values (as in the tutorial example for some values of angle alpha.

Thanks in advance

I inadvertently discovered that the save command (and probably read, write, export and import commands too?) returns an error (something like "can't write ...") when the file length is too large (265 in my case).

Is this documented somewhere?
Is there a way to exceed this limit?
Assuming D=".../" and F="xxx.m", can we set the path of the directory D to some value and then use save something, F instead of save something cat(D, F) ?

Thanks in advance

I use Maple 2020 on a Windows 10 PC.

The command ssystem("CMD") enables to launch any Windows command accessible from the shell.
But how to launch a PowerShell command?

For instance ssystem("get-process") returns -1 (not surprising in fact for get-process is not a shell process).
How can I tell Maple that this command is to be found in the PowerShell ?

And even, I this possible for, in the ssystem help page, it's said that not all the command can be launched by ssystem

TIA

I have just come across this curious but really boring problem.
In the code snippet below, expr1 and expr2 are identical.

restart:
data := [a=1, b=2]:
convert(
  piecewise(And(x(t) > a, x(t) < b), 1, 0),
  Heaviside
):
expr1 := eval(eval(%, data),  x(t)=z):
plot(expr1, z=0..3);


convert(
  piecewise(And(z > a, z< b), 1, 0),
  Heaviside
):
expr2 := eval(%, data),:
plot(expr2, z=0..3);


But if I change the parameterization of the problem, expr2 is still correct but expr1 is not

restart:
data := [d=1.5, a=0.5]:
convert(
  piecewise(And(x(t) > d-a, x(t) < d+a), 1, 0),
  Heaviside
):
expr1 := eval(eval(%, data),  x(t)=z):
plot(expr1, z=0..3);


convert(
  piecewise(And(z > d-a, z< d+a), 1, 0),
  Heaviside
):
expr2 := eval(%, data),:
plot(expr2, z=0..3);

Where does this come from?

PS: I'm sorry not to be able loading the mw file

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