COSINE

For questions and discussion related to reading in and working with data.

COSINE

Postby ivory4 » Sun Dec 26, 2010 10:30 pm

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: 149
Joined: Mon Aug 24, 2009 12:16 pm

Re: COSINE

Postby ivory4 » Mon Dec 27, 2010 12:11 am

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: 149
Joined: Mon Aug 24, 2009 12:16 pm

Re: COSINE

Postby ivory4 » Mon Dec 27, 2010 2:02 am

Another quick question:

How to draw without replacement? Like draw two integer from 1 to 50 without replacement?
ivory4
 
Posts: 149
Joined: Mon Aug 24, 2009 12:16 pm

Re: COSINE

Postby TomDoan » Mon Dec 27, 2010 9:15 am

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).
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to Data: Reading, Writing, Transforming

Who is online

Users browsing this forum: No registered users and 0 guests