Alger

489 Reputation

16 Badges

10 years, 239 days

MaplePrimes Activity


These are replies submitted by Alger

Hi,

I do a little corection for frem(q,1)<>0 but there is an error in if programming and frem is an equivalent to mod for real numbers and give the same results.

restart;Qs:=24; p:=20; m:=3; q:=Qs/(2*p*m); if (q=1) then
> yc:=Qs/(2*p); elif (frem(q,1)<>0) then if (evalf(Qs/(2*p))<1) then
> yc:=1; else yc:=floor(Qs/(2*p)); end if; else yc:=round(0.8*Qs/(2*p)); end if;

the result must be yc:=1;

 

Hi,

I do a little corection for frem(q,1)<>0 but there is an error in if programming and frem is an equivalent to mod for real numbers and give the same results.

restart;Qs:=24; p:=20; m:=3; q:=Qs/(2*p*m); if (q=1) then
> yc:=Qs/(2*p); elif (frem(q,1)<>0) then if (evalf(Qs/(2*p))<1) then
> yc:=1; else yc:=floor(Qs/(2*p)); end if; else yc:=round(0.8*Qs/(2*p)); end if;

the result must be yc:=1;

 

Hi,

Thanks for all answers, command frem of Maple give the same results as mod of matlab. I will see help page for details.

Best regards

Kamel

Hi,

Thanks for all answers, command frem of Maple give the same results as mod of matlab. I will see help page for details.

Best regards

Kamel

Hi,

Thank you for answer, but mod in maple work only for integer.

In matlab, mod(2.5,1)=0.5 in maple don't work.

Thanks

Hi,

Thank you for answer, but mod in maple work only for integer.

In matlab, mod(2.5,1)=0.5 in maple don't work.

Thanks

First 14 15 16 Page 16 of 16