herclau

Mr. Hermes Rozsa Iglesias

1038 Reputation

13 Badges

20 years, 167 days

MaplePrimes Activity


These are replies submitted by herclau

If we propose: q := convert(Equate(gg, gf), set).

The selection criteria within the set N is:
N [op (1, Zeta)+ 1 .. Op (1, N)]

where Zeta is the exact
 values of these m quantities.

fsolve({seq(N[i], i = op(1, Zeta)+1 .. nops(N))}, {lambda1, lambda2, lambda3, lambda4, lambda5, lambda6, lambda7, op(Equate(beta, beta1)), op(Equate( Zeta, Z0))})

If we propose: q := convert(Equate(gg, gf), set).

The selection criteria within the set N is:
N [op (1, Zeta)+ 1 .. Op (1, N)]

where Zeta is the exact
 values of these m quantities.

fsolve({seq(N[i], i = op(1, Zeta)+1 .. nops(N))}, {lambda1, lambda2, lambda3, lambda4, lambda5, lambda6, lambda7, op(Equate(beta, beta1)), op(Equate( Zeta, Z0))})

On my computer is faster the following command to: "Maple 15"

...

plots:-pointplot(xy, color = [seq(RGB(xy[i, 2], 0., 0.), i = 1 .. N)], symbolsize = 4)

> time[real]()-str;
                             2.000
> kernelopts(bytesalloc);
                            37283156

...

subsindets(p, specfunc(anything, COLOUR), proc (z) options operator, arrow; ('COLOUR')('RGB', c) end proc)

> time[real]()-str;
                             2.516
> kernelopts(bytesalloc);

> restart;
> N := 150;

> L := evalf(LinearAlgebra[RandomVector](N)+I*LinearAlgebra[RandomVector](N, density = .75, generator = 0 .. .5)):

> res := CodeTools:-Usage(ArrayTools[SearchArray](`~`[`>`](L, 0)));

memory used=41.29KiB, alloc change=63.99KiB, cpu time=15.00ms, real time=9.00ms


> SearchAll2 := proc (L)
local i, q;
q := [seq(`if`(`and`(L[i] > 0, `=`(Im(L[i]), 0)), i, NULL), i = 1 .. op(1, L))];
remove(has, q, 'NULL')
end proc;

> res := CodeTools:-Usage(SearchAll2(L));

memory used=46.92KiB, alloc change=63.99KiB, cpu time=0ns, real time=0ns

> restart;
> N := 150;

> L := evalf(LinearAlgebra[RandomVector](N)+I*LinearAlgebra[RandomVector](N, density = .75, generator = 0 .. .5)):

> res := CodeTools:-Usage(ArrayTools[SearchArray](`~`[`>`](L, 0)));

memory used=41.29KiB, alloc change=63.99KiB, cpu time=15.00ms, real time=9.00ms


> SearchAll2 := proc (L)
local i, q;
q := [seq(`if`(`and`(L[i] > 0, `=`(Im(L[i]), 0)), i, NULL), i = 1 .. op(1, L))];
remove(has, q, 'NULL')
end proc;

> res := CodeTools:-Usage(SearchAll2(L));

memory used=46.92KiB, alloc change=63.99KiB, cpu time=0ns, real time=0ns

@acer 

In 1D Maple decreases runtime but still quite extended in time: 4108.125 seconds.  Annex 1D Maple procedure and the source code from which attempt to translate into Maple. I also note the time of execution.

Hough_1D.mw

Gracias

It is normal to take so long time, a task like this?...

I get the following error when I try to compile the procedure

> cp := Compiler:-Compile(Hough);

Error, (in analyzetab[_Inert_ASSIGN]) cannot split right-hand-side of multiple assignment y, x := `ArrayTools[SearchArray]`(`\`~\`[\`=\`]`(IMG, 1.0))

@Markiyan Hirnyk 

You're right, the function ArrayTools[SearchArray] takes a long time. How to Make more efficient, in time, this task:

`and`(L > 0, `=`(Im(L), 0))

> N := 150; > L := evalf(LinearAlgebra[RandomVector](N)+I*LinearAlgebra[RandomVector](N, density = .75, generator = 0 .. .5)):

> ArrayTools[SearchArray](`~`[`>`](L, 0));

Gracias

@Markiyan Hirnyk 

You're right, the function ArrayTools[SearchArray] takes a long time. How to Make more efficient, in time, this task:

`and`(L > 0, `=`(Im(L), 0))

> N := 150; > L := evalf(LinearAlgebra[RandomVector](N)+I*LinearAlgebra[RandomVector](N, density = .75, generator = 0 .. .5)):

> ArrayTools[SearchArray](`~`[`>`](L, 0));

Gracias

 

> V := Vector([1, 5, 3, 10, 2, 1, 0, 4], datatype = float[8]):

> r, c, v := ArrayTools:-SearchArray(V);

                                  [1]  [1]  [ 1.]                                    
                                  [2]  [1]  [ 5.]                                    
                                  [3]  [1]  [ 3.]
                    r, c, v := [4], [1], [10.]
                                  [5]  [1]  [ 2.]                                    
                                  [6]  [1]  [ 1.]                                    
                                  [8]  [1]  [ 4.]

 

seq(`if`(v[i] < 3, r[i], NULL), i = rtable_dims(v));

                                                        ?0?  1, 5, 6

> r, c, v := ArrayTools:-SearchArray(V<~3)

                                                  [1]  [1]  [1.]                                     
                                                  [5]  [1]  [1.]
                                    r, c, v := [6]  [1]  [1.]
                                                  [7]  [1]  [1.]

 

> V := Vector([1, 5, 3, 10, 2, 1, 0, 4], datatype = float[8]):

> r, c, v := ArrayTools:-SearchArray(V);

                                  [1]  [1]  [ 1.]                                    
                                  [2]  [1]  [ 5.]                                    
                                  [3]  [1]  [ 3.]
                    r, c, v := [4], [1], [10.]
                                  [5]  [1]  [ 2.]                                    
                                  [6]  [1]  [ 1.]                                    
                                  [8]  [1]  [ 4.]

 

seq(`if`(v[i] < 3, r[i], NULL), i = rtable_dims(v));

                                                        ?0?  1, 5, 6

> r, c, v := ArrayTools:-SearchArray(V<~3)

                                                  [1]  [1]  [1.]                                     
                                                  [5]  [1]  [1.]
                                    r, c, v := [6]  [1]  [1.]
                                                  [7]  [1]  [1.]

With the command, subpicture,I take the portion of it that interests me.
How I manage to include this sub-image in another image (img)?

Preview(correctedT)

imgs := GetSubImage(correctedT, 100, 125, 20, 120)
Preview(imgs)

ImageTools[SetSubImage](img, imgs, 50, 50)

Error, (in ImageTools:-SetSubImage) image and subimage must have same number of layers and same order

ImageTools:-Mask(img, imgs)

Error, (in ImageTools:-Mask) invalid input: evalhf(zip) expects rtables with equal dimensions

Gracias

@acer 

Using the "Preview" is displayed coordinate axes. As you do to put text, for example in the pair [50,50], safe the "Preview". Gracias

 

Preview

http://www.mapleprimes.com/view.aspx?sf=134660/437880/Preview.jpg

@acer 

Using the "Preview" is displayed coordinate axes. As you do to put text, for example in the pair [50,50], safe the "Preview". Gracias

 

Preview

http://www.mapleprimes.com/view.aspx?sf=134660/437880/Preview.jpg

3 4 5 6 7 8 9 Last Page 5 of 13