herclau

Mr. Hermes Rozsa Iglesias

1038 Reputation

13 Badges

20 years, 166 days

MaplePrimes Activity


These are replies submitted by herclau

@acer 

these are the two images. Also I would like to point with a red circle part of the image. Is it possible that the image of the circle have transparency?...

plots:-textplot([1, .5, "take from A"], align = {above, right}, font = [bold], axes = none)

img := Matrix(ToGrayscale(Read(cat(kernelopts(datadir), "/images/FingerPrint.jpg"))))

Gracias

@acer 

these are the two images. Also I would like to point with a red circle part of the image. Is it possible that the image of the circle have transparency?...

plots:-textplot([1, .5, "take from A"], align = {above, right}, font = [bold], axes = none)

img := Matrix(ToGrayscale(Read(cat(kernelopts(datadir), "/images/FingerPrint.jpg"))))

Gracias

I need of your instructions, trying to play, what is shown here, I get the following results....

> restart;
> with(ImageTools);
> img := Read("FingerPrint.jpg");
> View(img)
> map2(Height, img, [size, lower, upper, range]);

                    [240, 1, 240, 1 .. 240]                                     (1)
> map2(Width, img, [size, lower, upper, range]);

                    [256, 1, 256, 1 .. 256]                                     (2)
> hsize, vsize := (1)[1], (2)[1];
> T := Read("text1.jpg");

correctedT := rtable_redim(T[1+6 .. (-1)-4, 1+5 .. (-1)-5, 1 .. -1], 1 .. vsize, 1 .. hsize, 1 .. 3)

Error, 1st dimension must be an integer or an integer range of the form N..N+35

> View(T);
> newQ := ImageTools:-Mask(img, T);

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

 

Gracias

I need of your instructions, trying to play, what is shown here, I get the following results....

> restart;
> with(ImageTools);
> img := Read("FingerPrint.jpg");
> View(img)
> map2(Height, img, [size, lower, upper, range]);

                    [240, 1, 240, 1 .. 240]                                     (1)
> map2(Width, img, [size, lower, upper, range]);

                    [256, 1, 256, 1 .. 256]                                     (2)
> hsize, vsize := (1)[1], (2)[1];
> T := Read("text1.jpg");

correctedT := rtable_redim(T[1+6 .. (-1)-4, 1+5 .. (-1)-5, 1 .. -1], 1 .. vsize, 1 .. hsize, 1 .. 3)

Error, 1st dimension must be an integer or an integer range of the form N..N+35

> View(T);
> newQ := ImageTools:-Mask(img, T);

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

 

Gracias

How to implement the following procedure

[C,LAGS] = XCORR(...)  returns a vector of lag indices (LAGS)?

@pagan 

MATLAB: Definition

The functions Y=fft(x) and y=ifft(X) implement the transform and inverse transform pair given for vectors of length by:

X(k) = sum(x(j)*omega[N]^(-j(k-1)+1), j = 1 .. N)

x(j) = (sum(X(k)*omega[N]^(-j(k-1)+1), k = 1 .. N))/N

where

omega[N] = exp((-2*Pi*i)*(1/N))

is an th root of unity.

 

 

looks into the worksheet attached

FFT_MAPLE_vs_MATLA.mw

Gracias

@pagan 

MATLAB: Definition

The functions Y=fft(x) and y=ifft(X) implement the transform and inverse transform pair given for vectors of length by:

X(k) = sum(x(j)*omega[N]^(-j(k-1)+1), j = 1 .. N)

x(j) = (sum(X(k)*omega[N]^(-j(k-1)+1), k = 1 .. N))/N

where

omega[N] = exp((-2*Pi*i)*(1/N))

is an th root of unity.

 

 

looks into the worksheet attached

FFT_MAPLE_vs_MATLA.mw

Gracias

I would like general population sample as follows:

[[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]]

is possible to do with the statistical package?

Gracias

>p1:=plot3d(Qnum(Do,N),Do=0.05..0.5,N=1..800,axes=boxed, labels = ['Do','N', 'Q'], view = [0.05 .. 0.5,1..800, 0..25000]):p1;

> p2 := plottools:-getdata(p1)[3];
                    
> max(p2[2 .., ..]);

                      24532.2980300000018

> maxindex := proc (A::Matrix) local i; op(attributes(max(seq(setattribute(Float(abs(rhs(i)), 0), [lhs(i)]), i = op(2, A))))) end proc;

> maxindex(p2[2 .., ..]);

                             14, 5

> rtable_scanblock(p2, [rtable_dims(p2)], proc (val, ind, res) options operator, arrow; `if`(res[2] < val, [ind, val], res) end proc, [[1, 1], -infinity]);

                 [[15, 5], HFloat(24532.29803)]

> max(select(type, p2, numeric));

                      24532.2980300000018

> Optimization:-Maximize(Qnum(Do, N), Do = 0.5e-1 .. .5, N = 1 .. 800);

Warning, no iterations performed as initial point satisfies first-order conditions

 [17986.2255616841648, [Do = HFloat(0.275), N = HFloat(400.5)]]

> eval(Qnum(Do, N), [Do = .275000000000000, N = 400.500000000000]);

                          17986.22557

>p1:=plot3d(Qnum(Do,N),Do=0.05..0.5,N=1..800,axes=boxed, labels = ['Do','N', 'Q'], view = [0.05 .. 0.5,1..800, 0..25000]):p1;

> p2 := plottools:-getdata(p1)[3];
                    
> max(p2[2 .., ..]);

                      24532.2980300000018

> maxindex := proc (A::Matrix) local i; op(attributes(max(seq(setattribute(Float(abs(rhs(i)), 0), [lhs(i)]), i = op(2, A))))) end proc;

> maxindex(p2[2 .., ..]);

                             14, 5

> rtable_scanblock(p2, [rtable_dims(p2)], proc (val, ind, res) options operator, arrow; `if`(res[2] < val, [ind, val], res) end proc, [[1, 1], -infinity]);

                 [[15, 5], HFloat(24532.29803)]

> max(select(type, p2, numeric));

                      24532.2980300000018

> Optimization:-Maximize(Qnum(Do, N), Do = 0.5e-1 .. .5, N = 1 .. 800);

Warning, no iterations performed as initial point satisfies first-order conditions

 [17986.2255616841648, [Do = HFloat(0.275), N = HFloat(400.5)]]

> eval(Qnum(Do, N), [Do = .275000000000000, N = 400.500000000000]);

                          17986.22557

p1:=plot3d(Qnum(Do,N),Do=0.05..0.5,N=1..800,axes=boxed, labels = ['Do','N', 'Q'], view = [0.05 .. 0.5,1..800, 0..25000]):

plottools:-getdata(p1)[3]
max(%[2..,..])
maxindex := proc (A::Matrix) local i; op(attributes(max(seq(setattribute(Float(abs(rhs(i)), 0), [lhs(i)]), i = op(2, A))))) end proc:
maxindex(%[2..,..])


p1:=plot3d(Qnum(Do,N),Do=0.05..0.5,N=1..800,axes=boxed, labels = ['Do','N', 'Q'], view = [0.05 .. 0.5,1..800, 0..25000]):

plottools:-getdata(p1)[3]
max(%[2..,..])
maxindex := proc (A::Matrix) local i; op(attributes(max(seq(setattribute(Float(abs(rhs(i)), 0), [lhs(i)]), i = op(2, A))))) end proc:
maxindex(%[2..,..])


I have problems with the command solve (g (y) singular (g (y), y);

Gracias

 

I have problems with the command solve (g (y) singular (g (y), y);

Gracias

 

@mois 

sol := Search(ObjFn, [op(ModCons), op(Bounds)], startpoint, variables = var, tolerances = 10^(-8), checkexit = 10, evaluationlimit = 10000, step = 0.1e-3, maximize)
Error, (in LinearAlgebra:-VectorNorm) object too large

sol := Search(ObjFn, [op(ModCons), op(Bounds)], startpoint, variables = var, tolerances = 10^(-8), checkexit = 10, step = 0.1e-3, maximize)
Error, (in is/internal) object too large

 sol := Search(ObjFn, [op(ModCons), op(Bounds)], startpoint, variables = var, tolerances = 10^(-8), checkexit = 10, step = 0.1e-1, maximize);
Error, (in LinearAlgebra:-VectorNorm) object too large

sol_2 := Search(ObjFn, [op(ModCons), op(Bounds)], startpoint, variables = var, tolerances = 10^(-8), checkexit = 10, evaluationlimit = 5000000, maximize, penaltymethod = true)
Error, (in evalf/piecewise) object too large

Please be that exemplifies the use of options evaluationlimit, step, penaltymethod, using maple_WorkSheet

http://www.mapleprimes.com/view.aspx?sf=130474/430212/DirectSearch_Alkylat.zip

4 5 6 7 8 9 10 Page 6 of 13