COSINE

For questions and discussion related to reading in and working with data.
ivory4
Posts: 144
Joined: Mon Aug 24, 2009 12:16 pm

COSINE

Unread post 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?
ivory4
Posts: 144
Joined: Mon Aug 24, 2009 12:16 pm

Re: COSINE

Unread post 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))
ivory4
Posts: 144
Joined: Mon Aug 24, 2009 12:16 pm

Re: COSINE

Unread post by ivory4 »

Another quick question:

How to draw without replacement? Like draw two integer from 1 to 50 without replacement?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: COSINE

Unread post 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).
Post Reply