Post Reply 
problem with CHS
03-01-2019, 09:49 PM
Post: #7
RE: problem with CHS
(03-01-2019 06:56 PM)Albert Chan Wrote:  On XCas, rand(n, 1, 10) does not really meant n random numbers, ranged 1 to 10

I think it meant n random samples from list 1 to 10, thus all elements are unique.

RANDINT(a,b,c) which is a home function, returns a list of size a with each element being a random integer x from b to c. The elements are not unique.

(03-01-2019 06:56 PM)Albert Chan Wrote:  [sx, sy] := makemat(x -> rand(2)*2 - 1, 2, n);

With the same logic and using RANDINT :
Code:
sx:=RANDINT(n,0,1)*2-1;
sy:=RANDINT(n,0,1)*2-1;

Anyway, getting {--1} as you had initially looks suspicious to me.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
problem with CHS - Tyann - 03-01-2019, 09:22 AM
RE: problem with CHS - StephenG1CMZ - 03-01-2019, 01:42 PM
RE: problem with CHS - rprosperi - 03-01-2019, 01:56 PM
RE: problem with CHS - Tyann - 03-01-2019, 02:44 PM
RE: problem with CHS - Tyann - 03-01-2019, 05:26 PM
RE: problem with CHS - Albert Chan - 03-01-2019, 06:56 PM
RE: problem with CHS - Didier Lachieze - 03-01-2019 09:49 PM
RE: problem with CHS - Tyann - 03-02-2019, 05:50 AM



User(s) browsing this thread: 1 Guest(s)