Gonzalo Garcia

150 Reputation

6 Badges

16 years, 289 days

MaplePrimes Activity


These are questions asked by

Dears,

Consider the problem min{|a+2*i| : i integer}, where a is a number of the form 2k*t for a fixed integer k>1 and t in [0,1]. A simple checking shows that i must belongs to the interval [-(1+a)/2,(1-a)/2] and as the legth of this interval is 1, there is two integers in this interval.

How can I compute this integer i with Maple? The commad "ceil" not seem very suitable. Some idea?
Many thanks in advance for your comments.

Dears,

Let C a square in the n-diemnsional Euclidean space. Somebody know how to divide C into 2^{n} congruent subsquares? 

For instance, for n=2 and  say C:=[0,1]x[0,1], the unit closed square, we will obtain the 2^{2}=4 subsquares [0,1/4]x[0,1/4], [0,1/4]x[1/2], [1/2,1]x[0,1/4] and [1/2,1]x[1/2,1].  

Many thanks in advance for your comments!!

Hi!,

Assume that we hace a set points in the plane, put X:=[a1,a2,...,aN] where each ai is given by its coordinates [x,y]. The commnad "convexhull(X)" give us the points of the convex hull of X, but how I can find to "lower-right" of these points? Please, see the attached image. I need to findo the points A,C,E and F, marked with a solid circle.

Many thanks in advances for your comments.

 

 

Dears,

I have seen a Mathematica code which I would like to have it in Maple, since I do not know that program. Let f(z) an analytic function, say f(z):=1+2^{z+1}+3^{z}. To find the roots of f(z) in a regingion, we can use in Maple the command "Analytic" (of the package "RootFinding"). However, in Mathematica is used the following:

L = 20; Monitor[zeros = Flatten@Table[N[z /. Solve[f[z] ⩵ 0 && k L ≤ Re[z] ≤ k L + L && -10 < Im[z] < 10, z], 25],{k, 300}],k];

What means the "N[z/. Solve..." instruction? Also, the following command:

SortBy[zeros, Re]; 

Can be "translated" to Maple?

 

Many thaks in advance for your comments!

With Regards,

G.

Hi!

I have seen th following procedure to compute the image of the points of [0,1] under the so called Peano space-filling curve (sorry, I have to pasted the code in "text plane" mode):

P[0] := (x, y) -> ((1/3)*y, (1/3)*x);

P[1] := (x, y) -> (-(1/3)*x+1/3, (1/3)*y+1/3); 

P[2] := (x, y) -> ((1/3)*x, (1/3)*y+2/3); 

P[3] := (x, y) -> ((1/3)*x+1/3, -(1/3)*y+1);

P[4] := (x, y) -> (2/3-(1/3)*y, 2/3-(1/3)*x); 

P[5] := (x, y) -> ( (1/3)*x+1/3, 1/3-(1/3)*y));

 P[6] := (x, y) -> (1/3)*x+2/3, (1/3)*y);

P[7] := (x, y) -> (-(1/3)*x+1, (1/3)*y+1/3);

P[8] := (x, y) -> ((1/3)*x+2/3, (1/3)*y+2/3);

peano := proc (t::numeric, depth::integer)

local q, r; global P;

if depth = 0 then return 0, 0 end if;

q := floor(9*t); r := 9*t-q;

return P[q](peano(r, depth-1))

end proc;

 

Now, I need to use the procedure "peanofun" as a function. For instance, if we define f:=(x,y)->x+y, I need to use (plot, compute, etc) for instance, the function f(peanofun(t,5))

Can you help me with this issue, please?

Many thanks for your time!

 

 

3 4 5 6 7 Page 5 of 7