casperyc

927 Reputation

10 Badges

11 years, 361 days

MaplePrimes Activity


These are replies submitted by casperyc

Hi Carl,

I am now working on something further and now the previous trick seems to have failed.

In the worksheet, I have two reparameterisation

sstest(K,C) and sstest2(K,C)

and I want to subs it into

kappa:=mykappa(4,2,modname="both",tvarp=true);

 

sskappa is a procedure that does the substitution using your earlier "reverse" trick.

kappanew:=sskappa(sstest2(4,2),kappa);
works fine. My knowledge from

Estpars(DD1,pars,10);

tells me that

sstest(4,2);
should do the reparameterisation just fine, as good as sstest2(4,2);

 

But sskappa(sstest(4,2),kappa) had failed.

I have kept sstest(4,2) in the usual order, from "simpliest" to "most complex" terms.

I wonder whether its possible to improve more?

 

Thanks!

Casper

 

work.zip

Well, the main reason I would say is that my university only taught us Maple. Not many lessons, but it's a good start.

I had tried to use Mathematica, but it's not so popular (in UK).

Casper

@Markiyan Hirnyk 

Given this is just a "small toy example" of my problem, the matrix M took just about 4 min to run and used 2G on my computer. It' still a bit probmatic.

But it's better than nothing at all. As Carl said, i wonder why the GaussianElimination does some trick to this?

 

casper

@Markiyan Hirnyk 

Given this is just a "small toy example" of my problem, the matrix M took just about 4 min to run and used 2G on my computer. It' still a bit probmatic.

But it's better than nothing at all. As Carl said, i wonder why the GaussianElimination does some trick to this?

 

casper

If you can right click the output (1) and (2) immediately after opening the worksheet, "assign to name". Then the matrix can be saved into variables.

 

If you can right click the output (1) and (2) immediately after opening the worksheet, "assign to name". Then the matrix can be saved into variables.

 

@Carl Love Yes, I see what you mean.

I did't think too much when creating the components to the vector V.

I just did on the go.

Casper

 

@Carl Love Yes, I see what you mean.

I did't think too much when creating the components to the vector V.

I just did on the go.

Casper

 

Hi Acer,

In my worksheet, they are both column Vectors. Only difference is that they are created differently.

That's why I think it's just weird.

same type are being treated differently.

 

Casper

 

Hi Acer,

In my worksheet, they are both column Vectors. Only difference is that they are created differently.

That's why I think it's just weird.

same type are being treated differently.

 

Casper

 

Hi Carl,

Now, the type is also different. That's why I used Vector to creat it.

I want to keep V as a Vector so that I can differentiate it.

I can use

convert(V,Vector);

to do it.

 

But is it really the 'proper' way? Sorry that if I might seem a bit picky. But I just want to keep in mind when programming, it needs to be efficient and effective.

 

Casper

Hi Carl,

Now, the type is also different. That's why I used Vector to creat it.

I want to keep V as a Vector so that I can differentiate it.

I can use

convert(V,Vector);

to do it.

 

But is it really the 'proper' way? Sorry that if I might seem a bit picky. But I just want to keep in mind when programming, it needs to be efficient and effective.

 

Casper

Hi Carl,

Yes, it fixes the problem. Thanks.

I used the "strange way" to initialize the vector. It's part of a procedure. I thought I could use as a reminder of how big the vector is. Also, could that help with memory allocation?

I remember reading something about initializing Vectors, Matrices and table to allocate memory used better in one of the PDF manuals.

But it's just wired. Even they are both of the same type "Vector[column]", why are they 'so' different.

 

Casper

 

 

Hi Carl,

Yes, it fixes the problem. Thanks.

I used the "strange way" to initialize the vector. It's part of a procedure. I thought I could use as a reminder of how big the vector is. Also, could that help with memory allocation?

I remember reading something about initializing Vectors, Matrices and table to allocate memory used better in one of the PDF manuals.

But it's just wired. Even they are both of the same type "Vector[column]", why are they 'so' different.

 

Casper

 

 

Hi Carl,

I did read the help page on siderules and if you see in my original worksheet, it's the 3rd from bottom that i've tried. Only difference is i used

simplify(kappa, [newpar]);

instead of

simplify(kappa, {newpar});

which I am not sure what the difference is.

 

But yeah, if I run it individually in a reverse order, it works like a magic! That makes me think, how do Maple actually do it in simplify(kappa, {newpar}) ? Is it done in the natural order? or 'parrellel'?

Many thanks!

Casper

 

 

5 6 7 8 9 10 11 Last Page 7 of 22