Guimzo

25 Reputation

3 Badges

5 years, 168 days
Le poète a une fonction sérieuse ( V.H. )

MaplePrimes Activity


These are replies submitted by Guimzo

@acer Thank you but... i wish other answer

@Carl Love
Really thanks !

================================================================

 

To form the sequence of all in such that f(i) is integer:

select(type, A, integer &under f)[ ]

To form the sequence of all integers f(i) for in A:

This code that you had will work, as you've mentioned, but it's unnecessarily elaborate:

select(is@ `type`, f~([{seq}(k, k = a)[ ] ]), integer)[ ]

It can be simplified to

select(type, f~([A[ ] ]), integer)[ ]


=============================================================

All is good, really thank's ! Can i call you now not Carl Love but  " The BCL " The Big Carl Love ?!
Bests regards and sorry for my bad english

@Carl Love 
Thank you again.
But i would select the "x" , not the f(x).

Explain with my first code :

====================================================================

Here, Maple give the f(i) if f(i) is an integer but maple don't give the "i":

# f(1)=5 ; f(3)= 8 ; f(32)= 9 ; f(20)= 12

a:=[ seq(k,k=1..100)]:
L := [ ];
for i in a do
if type(f(i), integer) then L := [op(L), f(i)]; end if;
end do;print(L);

Maple result : L:=[ 5, 8, 9, 12 ] 

=====================================================

Here Maple give the "i" when f(i) is an integer :
 

# f(1)=5 ; f(3)= 8 ; f(32)= 9 ; f(20)= 12

a:=[ seq(k,k=1..100)]:
L := [ ];
for i in a do
if type(f(i), integer) then L := [op(L), i]; end if;
end do;print(L);

Maple result : L:=[ 1, 3, 32, 20]    # this is the list that i would

=========================================================

With select the code that you give work allright for the list of f(i)

select(is@ `type`, f~([{seq}(k, k = a)[ ]]), integer)[ ]

But i would now not the list of f(i) but the list of the "i" when f(i) is an integer.

@Carl Love 
With this code, it's allright, Maple select the "f(x)" :

select(is@`<`, f~([{seq}(k, k = 1..10)[ ]]), 1)[ ]

=======================================

How select the "x" that f(x) > 1 .........??

@Carl Love, i say now Carl BIG Love ! By changing some parameters with your last code it working, thank you.

@Christopher2222

H
ello, the procedure with example :

restart;
f := x -> EQUATION1;
Solveur := proc(b)
local a, e, i, k, L, B, H;
e := isolve(EQUATION2);
assign(e[1]);
a := {seq(x, k = 0 .. 10)};
L := [ ];
for i in a do if evalf(f(i)) > 1 then L := [op(L), f(i)];
end if; end do;
L; print(L);
unassign('x');
B := rhs(eval(e[1], _Z1 = 0));
if 0 < B then
Solveur(B);
end if;
end proc:
Solveur(10);

==================================================

MAPLE result :

[ 1, 1, 1 , 1, 2, 2, 2,2 ]
[ 3, 8, 1 , 3, 2,  ]
[ 12, 3, 7, 2, 2, 1, 9,1]

I WOULD:

L:= [ 1, 1, 1 , 1, 2, 2, 2, 2, 3, 8, 1 , 3, 2,12, 3, 7, 2, 2, 1, 9,1]

Hello guy,

Thank you for your goods answer but i use a "procedure" and the solutions don't work ...

Thank you guys, but nothing work for my loop ....

@Christopher2222 you're Ronan's friend ...?! Seriously...?!!

@Ronan Are you serious guy ...?!!

Thank you again @ acer 21929 

Finally i've found this :

assign(a);
c := [seq(op(i), i = a)];
d := {seq(abs(j), j = {seq(op(i), i = c)})};

So thank's @One way and @Kitoum !

Hi friends,

So thanks !
In Math 1-D is Ok !
Thanks again
See u

Hi friends,
I use Maple 2019.
The syntaxe is not write correctly

restart:
(x, y, s):= (12, 46, 0):
L:= [
    while 0 < y do
        if y::odd then s+= x; --y else x*= 2; y/= 2 fi;
        (x,y,s)
    od
];


Read again please !

"s+= x" .....???????
"if y::odd"......????????
etc
etc
etc....


 

 

@Carl Love
Thank you for answer and your good observation.
For your way, Maple say  "Error, invalid sequence"

restart:
(x, y, s):= (12, 46, 0):
L:= [
    while 0 < y do
        if y::odd then s+= x; --y else x*= 2; y/= 2 fi;
        (x,y,s)
    od
];
1 2 Page 1 of 2