## 524 Reputation

15 years, 81 days

## Now, it's correct...

Hi,

Yes, when I corrected <>, not ~= there is no problem and the code is correct.

Thank you for all

Kamel

## Hi, I do a little corection for frem(q,...

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,...

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;

## frem is ok...

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

## frem is ok...

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

## mod in maple is just for integer ?...

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

## mod in maple is just for integer ?...

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 15 16 17 Page 17 of 17
﻿