Harry Garst

174 Reputation

5 Badges

13 years, 361 days

MaplePrimes Activity

These are replies submitted by Harry Garst


Thanks for your reply.

in 2D these plots make clear that rotation changes the variance of the projections:

I found these animated gifs here:



In 3D I think the projections should be on a plane. I would like to make semi-transparant XYZ planes with projections on them for a few points. Sure, it would be a mess if the data cloud consists of a large number of observations.

I never seen an animation in 3D using a rotating XYZ plane with projections on them for a few data points.

Maple animations can be very insightful, at least for me.



Thanks a lot! This is really helpful. 

kind regards,



A mixture model will be fine.

But on a general level I am trying to figure out the equations for the EM algorithm:



However, a Maple demonstration would be great.

My other questions (tetrachoric and polychoric correlations) could probably be solved with the 'fsolve' command and a bivariate normal distribution (as suggested by a collegue). Comparing observed proportions in a contingency table and expected proportions in a bivariate distribution with  a fixed correlation coefficient, but at least for polychoric correlations it has to be solved iteratively.
In R the code would be available, but to translate R into Maple may not be an easy job.


Thanks both of you!

I learned something new again!



Maybe the OP meant Tanis and not Tannis.

If so, you can find everything on this website: 




I did not choose it: it is the default option in my version of Maple.

I started using Maple in 1995 when everything was rather simple. All the later innovations in the interface I have tried to ignore. 

What is now the preferred way and why are there so many options?

@Carl Love 



(My only consolation is that there seems to be no single Maple command to accomplish the splitting of polynomials this way. Perhaps no one thinks this is a fruitful strategy).

@John Fredsted 

Thank a lot! 

(It took me a whole day to write the proc and you write only one line and the result is the same!)


Thanks a lot!

I still cannot find it in the HELP pages. 



restart; with(LinearAlgebra); M := Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); r := RowDimension(M); L := Matrix(1, 3, [a, b, c])



Matrix(%id = 18446746060751755134)


Let_me_sit_on_row := proc (M::Matrix, R::Matrix, rij::integer)::Matrix; local K, Z, N, i, r, w; r := RowDimension(M); K := `<|>`(IdentityMatrix(RowDimension(M)), ZeroVector(RowDimension(M))); w := r+3-rij; Z := Matrix(4, 1, [1, 2, 3, 4]); for i from 0 to w-3 do Z := RowOperation(IdentityMatrix(r+1), [r-i, r-i+1]).Z end do; Z := convert(Z, list); N := `<,>`(K[() .. (), Z])^%T.M+`<,>`(`<,>`(ZeroMatrix(r, r), R)[Z, () .. ()]); return N end proc

Let_me_sit_on_row(M, L, 1); Let_me_sit_on_row(M, L, 2); Let_me_sit_on_row(M, L, 3); Let_me_sit_on_row(M, L, 4)







Matrix(%id = 18446746060751729478)




Download def_mapleprimes_insert_row.mw



Thanks a lot!

I was able to modify your code to get what I wanted (without knowing anything of a Groebner basis at all) .

kind regards,

Harry Garst



Thanks a lot! This is a very interesting solution.

kind regards,

Harry Garst

as I said I looking for a combination of factored polynomials. What I have done so far is to factor subsets of the polynomial. That strategy worked for smaller problems (see attached maple file), but now I would like to find out the most efficient strategy. I guess that this is also a well-known problem for mathematicians (I myself am a psychologist).

yes, indeed. Both replies are extremely helpful. (Although there are good reasons for trying a matrix solution: the expression is an element from a matrix inversion).


Thanks a lot.

Harry Garst

@Harry Garst 


When I square the denominator in your example both subs and algsubs give the intended result.


1 2 3 Page 1 of 3