acer

32348 Reputation

29 Badges

19 years, 330 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

The Programming Guide for Maple 15 is (at present) available from the Documentation Center.

acer

A Plot Component can be resized programatically.

plotcomponent.mw 

acer

A Plot Component can be resized programatically.

plotcomponent.mw 

acer

@hirnyk That's exactly my point! You won't know whether it is just taking a long time, or not converging at all, when it seems to run forever! The same is true for the original code (though that is much slower, on top of having this problem).

So, that was my point. How to control the Digits (in two places, perhaps differently) so that it is 1) not slower than it has to be, and 2) convergent, and 3) convergent at the correct minimal value of n-1?

I don't think that those are easy questions, without knowing some analysis of the behaviour of the famous approximation.

(note. when I wrote that Digits might have to depend on q, inside `euclid`, that introduces a technical issue. We want `euclid` to remember results. But we don't want it to remember inaccurate float results. So `euclid` would have to accept an additional argument q, if internally it used Digits as a function of q.)

acer

@hirnyk That's exactly my point! You won't know whether it is just taking a long time, or not converging at all, when it seems to run forever! The same is true for the original code (though that is much slower, on top of having this problem).

So, that was my point. How to control the Digits (in two places, perhaps differently) so that it is 1) not slower than it has to be, and 2) convergent, and 3) convergent at the correct minimal value of n-1?

I don't think that those are easy questions, without knowing some analysis of the behaviour of the famous approximation.

(note. when I wrote that Digits might have to depend on q, inside `euclid`, that introduces a technical issue. We want `euclid` to remember results. But we don't want it to remember inaccurate float results. So `euclid` would have to accept an additional argument q, if internally it used Digits as a function of q.)

acer

Call your a+b*I as the more commonly used name z. You z^n is a special instance of (z-c)^n, where c=0.

You've implied (by your "begin with") that the general term has something more that just the (a+b*i)^n to it. Let's express the general term as a(n)*(z-c)^n, where a(n) is the part you omitted to mention explictly.

Now read here, on Laurent series. You wrote that you suspect convergence for all z such that abs(Re(z))<1 and abs(Im(z))<1. That's not right, in general. But you can read there about convergence for z in an annulus.

This is part of the basics of complex analysis, which is well studied.

acer

I agree with you, Patrick. Finding old Comments is overly difficult. I too have been frustrated and unable to find some old Comments, due to the missing lists you mention. Sometimes, even when I know who the author was.

But searching this site is harder than it ought to be in general. Sometimes I wonder whether material within <pre> tags is indexed. (It'd be awful if it weren't, as a lot of searches depend on some maple code word, and that mark-up is popular and useful for code. ...but it might explain some things.)

All member's blogs were done away with, with the arrival of the "new" mapleprimes. Old blog posts weren't deleted, but they became merely Posts. I found that disappointing, as the blog lists for Joe, Jacques, Alec, Doug, Axel, etc, were convenient and the contents were very interesting. Some people have subsequently gone back and given such posts (of their own) the blog "tag". The corporate blog site was merged into mapleprimes at this time.

I think that a large part of the value of this site is in its stockpile of material by its members. But without really good searching and indexing it just becomes a conveyor-belt of (free, one-off) tech support. But throwing away any of the content after its initial submission, by making it too hard to find, is wasteful.

acer

I use both Primes and the Cloud for sharing.

I don't post to the "public" Cloud group since it is full of (accidentally?) misplaced assignment submissions for college courses. Either some course instructors don't bother to create distinct groups for their course submissions, or the students don't submit properly, or don't delete from "public" after realizing a mistaken submission. Totally empty sheets can get flagged and removed, but nobody cleans up the many old or misplaced assignments there. Sorry to sound uptight about it, but the amount of clutter detracts from the forum.

I created a Cloud group where I upload (some of the longer) worksheets that I post on Primes. Feel free to "join". See my profile page for a little more detail.

I also use the Cloud as a convenient way to access material of my own when running Maple from different locations.

acer

@Kamel Yes, that's possible. But you have to know how many nonzero entries are in `a`.

Here's that rewritten, where you know in advance that there are 15 nonzero entries in `a`.

a := Vector[row](110000,[1.3,1.4,1.5,1.6,1.0,1.0,-1.0,2.0,2.0,
                      3.0,-2.0,1.0,-2.0,1.0,1.0], 
                  datatype=float[8]):

 irow := Vector[row](110000,[4,4,4,4,1,1,2,2,2,3,3,4,4,4,4], 
                  datatype=integer[kernelopts('wordsize')/8]):

 icol := Vector[row](110000,[1,2,3,4,2,3,1,3,4,1,4,1,2,3,4], 
                  datatype=integer[kernelopts('wordsize')/8]):

A:=Matrix(5,5,storage=sparse,datatype=float[8]):
 for i from 1 to 15 do
    A[irow[i],icol[i]]:=A[irow[i],icol[i]]+a[i];
 end do:
A;

Now let's try to find out that number, 15.

> rtable_num_elems(a,'NonZero');
                               15

So it looks like it could be done as,

restart:
a := Vector[row](110000,[1.3,1.4,1.5,1.6,1.0,1.0,-1.0,2.0,2.0,
                      3.0,-2.0,1.0,-2.0,1.0,1.0], 
                  datatype=float[8]):

 irow := Vector[row](110000,[4,4,4,4,1,1,2,2,2,3,3,4,4,4,4], 
                  datatype=integer[kernelopts('wordsize')/8]):

 icol := Vector[row](110000,[1,2,3,4,2,3,1,3,4,1,4,1,2,3,4], 
                  datatype=integer[kernelopts('wordsize')/8]):

A:=Matrix(5,5,storage=sparse,datatype=float[8]):
 for i from 1 to rtable_num_elems(a,'NonZero') do
    A[irow[i],icol[i]]:=A[irow[i],icol[i]]+a[i];
 end do:
A;

Of course, as you mentioned, `irow`, `icol`, and `a` all have the same number of non-zero entries, all packed up at the front.

I don't really understand why you have to make those three Vectors so large (size 110000). Is that supposed to be the largest possible number of values your code might in principal require to specify? Do you really need to store them separately and explicitly, or could you make them storage=sparse and initially short too? Or could you instead just curate the data by directly adding into sparse Matrix A, and omitting those three Vectors altogether?

acer

@Kamel Yes, that's possible. But you have to know how many nonzero entries are in `a`.

Here's that rewritten, where you know in advance that there are 15 nonzero entries in `a`.

a := Vector[row](110000,[1.3,1.4,1.5,1.6,1.0,1.0,-1.0,2.0,2.0,
                      3.0,-2.0,1.0,-2.0,1.0,1.0], 
                  datatype=float[8]):

 irow := Vector[row](110000,[4,4,4,4,1,1,2,2,2,3,3,4,4,4,4], 
                  datatype=integer[kernelopts('wordsize')/8]):

 icol := Vector[row](110000,[1,2,3,4,2,3,1,3,4,1,4,1,2,3,4], 
                  datatype=integer[kernelopts('wordsize')/8]):

A:=Matrix(5,5,storage=sparse,datatype=float[8]):
 for i from 1 to 15 do
    A[irow[i],icol[i]]:=A[irow[i],icol[i]]+a[i];
 end do:
A;

Now let's try to find out that number, 15.

> rtable_num_elems(a,'NonZero');
                               15

So it looks like it could be done as,

restart:
a := Vector[row](110000,[1.3,1.4,1.5,1.6,1.0,1.0,-1.0,2.0,2.0,
                      3.0,-2.0,1.0,-2.0,1.0,1.0], 
                  datatype=float[8]):

 irow := Vector[row](110000,[4,4,4,4,1,1,2,2,2,3,3,4,4,4,4], 
                  datatype=integer[kernelopts('wordsize')/8]):

 icol := Vector[row](110000,[1,2,3,4,2,3,1,3,4,1,4,1,2,3,4], 
                  datatype=integer[kernelopts('wordsize')/8]):

A:=Matrix(5,5,storage=sparse,datatype=float[8]):
 for i from 1 to rtable_num_elems(a,'NonZero') do
    A[irow[i],icol[i]]:=A[irow[i],icol[i]]+a[i];
 end do:
A;

Of course, as you mentioned, `irow`, `icol`, and `a` all have the same number of non-zero entries, all packed up at the front.

I don't really understand why you have to make those three Vectors so large (size 110000). Is that supposed to be the largest possible number of values your code might in principal require to specify? Do you really need to store them separately and explicitly, or could you make them storage=sparse and initially short too? Or could you instead just curate the data by directly adding into sparse Matrix A, and omitting those three Vectors altogether?

acer

@Kamel Your code fragment calls `find` and `size` on S, before it assigns to S. What does that mean?

@Kamel Your code fragment calls `find` and `size` on S, before it assigns to S. What does that mean?

If one flags an old Post with a brief note then the admins get a message. That way specific pages can get converted to Question, and their Comments to Answers.

Yes, there are a lot of old Posts that were not properly ported to Primes ver.2 in this respect. But at least the pages on which you want to up vote Answers can be handled (if manually at least).

acer

The performance of Statistics:-CovarianceMatrix was significantly improved, between Maple 13 and Maple 14.

The performance (as shown in the above Post for the Maple 12 and Maple 13 timeframes) of the CovarianceMatrix command has improved in Maple 14 to be on par with the Post's suggested implementation.

acer

The performance of Statistics:-CorrelationMatrix was significantly improved, between Maple 13 and Maple 14.

The performance (as shown in the above Post for the Maple 12 and Maple 13 timeframes) of the CorrelationMatrix command has improved in Maple 14 to be on par with the Post's suggested implementation.

acer

First 438 439 440 441 442 443 444 Last Page 440 of 592