You are Here: Home >< Maths

# matlab, uni? Watch

1. What does

cwk=ceil(randn(1,50)*15+55);

mean in english??
2. I imagine cwk is the name of a variable.

"ceil" is the ceiling function, which takes the smallest integer greater than or equal to a number. For example, ceil(3) = 3 and ceil(3.1) = 4.

randn(1,50) takes a random number between 1 and 50 (not necessarily an integer, hence the need for the ceil)

I'd hope that + and * are obvious.

So all in all, "cwk = ceil(randn(1,50)*15+55);" gives , where is a random number between 1 and 50.
3. ahhh

thanks
4. (Original post by Farhan.Hanif93)
Typo I presume but I think you mean that n is a number between 1 and 50, as opposed to between 1 and 55.
Yup.
5. just to establish:

cwk = ceil(randn(2,397)*185+12)

would be (185n+12) where n is a rnadom number between 2 and 397?
6. (Original post by elldeegee)
just to establish:

cwk = ceil(randn(2,397)*185+12)

would be (185n+12) where n is a rnadom number between 2 and 397?
Yes.

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: December 10, 2010
Today on TSR

### Degrees to get rich!

... and the ones that won't

### Cambridge interviews pour in...

Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams

## Groups associated with this forum:

View associated groups
Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.