Jean-Michel

Dr. jean-michel collard

70 Reputation

7 Badges

1 years, 13 days
Cergy (suburb of Paris), France
Ph.D. in Mathematics (Differentiel Topology) Master Degree in Cosmology

MaplePrimes Activity


These are replies submitted by Jean-Michel

@janhardo 

Hello the "search" man :)

Great work you did !

however there are at leasr 2 fatal errors :

Error, `FindPositions` does not evaluate to a module

Error, (in fprintf) integer expected for integer format

where is the module ?

thanks and tchüss,

JM

@janhardo 

well done janhardo but at line 1:

Error, illegal use of an object as a name

I will see that tomorrow morning because tonite i'm too tired :) and it's only 9:30 pm

Tschüss,

JM

@janhardo 

Hello,

I am afraid that I can't understand English enough to comprehend

your question...

Anyway here is a link toward Position in Mathematica.

I think it's quite difficult to extend this to Maple,very difficult...

I pass my whole morning on that but didn't progress at all.

Tschüss,

JM

https://reference.wolfram.com/language/ref/Position.html

@janhardo 

I know that Position is a complicated function.

Position[expr,pattern] gives a list of the positions at which objects \
matching pattern appear in expr.  (your program)

Position[expr,pattern,levelspec] finds only objects that appear on \
levels specified by levelspec. 

Position[expr,pattern,levelspec,n] gives the positions of the first n \
objects found. 

"Position[\!\(\*StyleBox[\"pattern\", \"TI\"]\)] represents an \
operator form of Position that can be applied to an expression."

I will try later on to extend your function Position in Maple.

Tschüss,

JM

@janhardo 

I am stunned by the beauty of this program !

It exactly mimics the function Position in Mathematica.

Tchüss,

JM

@janhardo 

That's the hell of an excellent way for "position".

However i have to ponder a bit on the proc. beautifully writen.

this *is* Maple programming.

Best,

JM

@Kitonum 

At least I have learnt a lot of things today.

Many thanks.

JM

@KonstantinW 

Fantastic and out of the box.

Thank you,

JM

@Kitonum 

hello Kitonum,

This doesn't work as Position.

M := [[1, a], a, [[3 + a]], 2*a - 1];
              M := [[1, a], a, [[3 + a]], 2 a - 1]

Search(a, M);
                               2  

SearchAll(a, M);
                               2

Search(3, M);
                               0

Search(1, M);
                               0

I don't understand what I do wrong

JM

@acer 

Thanks Acer...so far ..so good.

Wonderfull example.

JM

@Kitonum 

Many thanks Kitonium :)

JM

@Kitonum 

Hi Kitonum,

What is the Maple equivalent of Mathematica's Position ?

M := {1, a, {c}, {2 + a}, {{{a}}}, {1 + a}}

MatrixQ[M]

False

Position[M, a]

{{2}, {4, 1, 2}, {5, 1, 1, 1}, {6, 1, 2}}    et voilà :)

Thanks,

JM

@nm 

Hello again nm,

This is a question of terminology.

M above is not a matrix but...MatrixForm returns a correct answer.

So what is the point to "matrixform" something which is not a matrix?

"math"ematica is at least incoherent.

JM

@nm 

Thank you nm this closes my question :)

Regards,

JM

@dharr 

running your worksheet I have :

error (in dsolve/numeric/BVPSolve) matrix is singular.

JM

1 2 3 4 Page 2 of 4