Page 1 of 1

COSINE

Posted: Sun Dec 26, 2010 9:30 pm
by ivory4

Code: Select all

all 101
set cos1 1 101 =  cos(2*%pi*t*14/96)
set cos2 1 101 = cos(2*%pi*(t*14/96))
May I ask why the second one generate all 1?

Re: COSINE

Posted: Sun Dec 26, 2010 11:11 pm
by ivory4
I think it is caused by using 1 instead of 1.0?

Code: Select all

set cos1 101 = cos(2*%pi*(t*14.0/96.0))

Re: COSINE

Posted: Mon Dec 27, 2010 1:02 am
by ivory4
Another quick question:

How to draw without replacement? Like draw two integer from 1 to 50 without replacement?

Re: COSINE

Posted: Mon Dec 27, 2010 8:15 am
by TomDoan
ivory4 wrote:Another quick question:

How to draw without replacement? Like draw two integer from 1 to 50 without replacement?
BOOT has a NOREPLACE option, or you can use %RANCOMBO(50,2).