sand15

370 Reputation

10 Badges

5 years, 334 days

MaplePrimes Activity


These are replies submitted by sand15

@MapleEnthusiast 

For your particular case (S=1, because I do not know how the "conditions" write for S > 1);
(Here the result is obviously 3)
 

restart:
# These 2 lines with Sum only serve to obtain concise outputs
Expr := (J, S) -> Sum(Sum(Sum(pi[i,j,k,F], i=1..J), j=1..J), k:1..S);
Rel := (j,k,J) -> Sum(pi[i,j,k,F],i=1..J)=1;

expr := (J,S)  -> eval(Expr(J,S), Sum=sum):
rel := (j, k, J) -> eval(Rel(j, k, J), Sum=sum):  # could be a function of (j, j, J, S)

e := expr(3, 1);
for j from 1 to 3 do
  e := algsubs(rel(j, 1, 3), e)
end do;

For S > 1 you could maybe inspire yourself from this ?

@tomleslie 

Thanks for your reply but the worksheet will only shows that I'm not bullshitting.
The real issue is about the lost of connection to the mpython server.
Either it is something already identified by the development team (or any mapleprimes member) or something that is due to the way Maple is installed on my machine.
 

 

 

@acer 

Thank you acer, it's very usefull.
A classical example I often meet is the following: randomly select a column or a row of a matrix according to some probability distribution.
I almost systematically forget the necessary conversion of hfloats into integers.

@Carl Love 

Thanks for the reply.
Due to intranet  problems I couldn't use Maple when I sent you my question, so I thought that trunc did the truncation on hfloats... when in fact the conversion to a sequence does the conversion to a sfloat and trunc "only" does the truncation.
Thanks also for the last paragraph of your answer, I'm going to take a look at this package and at evalhf.

 

@Carl Love 

Hi, 

I'm always worried by the fact a discrete random variable, even when defined on integers (think to a binomial one), always returns a float (contrary to random(...) for instance).
Neither round, floor nor ceil can convert these outputs into integers, so "my" UseHardwareFloats := false.
Couldn't  it be interesting that these three functions also operate on hfloats?

@dharr


(mmcdara from my professional account)

Thanks dharr, astute way to reduce the computing time indeed.
 

@janhardo 

(mmcdara from my professional account)

Thanks for the link, I'm going to look at it right now

@Preben Alsholm 

Thanks Preben for reporting me this error (I'm mmcdara now using my profesional account).
I indeed did this work at home with Maple 2015.2

Thank you again forhaving fix this bug for more Maple 2020.
As I'm at the office now I will test this with 2018 and 2019.

@acer 

I don't feel offended.

About OBSERVE, the idea is the following :

I'm working on a course about  probabilities and statistics  for internal purposes within my company. I have decided to construt this course around Maple in order to be able to present formal results and numerical approaches.
This course will begin with the basis, for instance what is a random variable (RV) ? and will present some examples.
My firs idea was to use the Start[Statistics][ContinuousDistributions] application. But I thought it would be smarter to have sliders to instanciate a RV, and to display the values of some of its statistics as thes sliders move.

I then imagined to write this procedure OBSERVE taking as parameter the RV a "student" would like to see.

But youy may be right, I have imagined a too more complex way to do this by passing the distribution as a parameter?

I've solved the issue by rewritting my own "sparsematrixplot" command based on PLOT and textplot (which enables the orientation of text... useful for the column labels that can have several characters and thus superimpose themselves).

 

@epostma 

(reply sent from my professional login)

Thanks for this precision.

@acer 

Thank you acer, I will look to that closely when back home.

@acer 

Thanks for the answer.

I've planned recently to buy a maple 2019 personal license.
Will the compiler be included in the delivery ot will I have to download LLVM by myself?
In addition I've read here that 2019.2 seems to present some problems: what version do you recommend me to buy?

 

@acer 

Just a question: I often meet situations wher simplify(MyExpression) doesn't work. In this cases I try symplify(expand(MyExpression))  and it sometimes works.
I always put this on some "natural", or "normal" difficulty so simplify an expression (the simplified expression may have different form depending on the person): why, do you consider, in the present case, the flaw of simplify merits a bug report?

 

@tomleslie 

Maybe you're right, unfortunately I have no access to Maple for the week to come (this reply from my smartphone). As soon as it will be possible to test your reply I let you know. Be patient.

Thanks in the meantime

 

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