Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Equivalence of flat() in Matlab

Subject: Equivalence of flat() in Matlab

From: Emma Robertson

Date: 4 Nov, 2011 15:15:25

Message: 1 of 2

Hi,

Does anyone know the exact equivalence of the 'c' command "flat()" in Matlab?

I've looked everywhere and didn't find any info., but I believe it has something to do with generating a random number. Would I be right in assuming that flat() is equivalent to rand()?

Cheers,
Emma

Subject: Equivalence of flat() in Matlab

From: Steven_Lord

Date: 4 Nov, 2011 15:52:31

Message: 2 of 2



"Emma Robertson" <ma87@hotmail.co.uk> wrote in message
news:j90vid$531$1@newscl01ah.mathworks.com...
> Hi,
>
> Does anyone know the exact equivalence of the 'c' command "flat()" in
> Matlab?

What does the flat() function do in C? As you can imagine, that's kind of
hard to search for with Google; when I tried I wasn't able to find any
information that appeared relevant.

> I've looked everywhere and didn't find any info., but I believe it has
> something to do with generating a random number. Would I be right in
> assuming that flat() is equivalent to rand()?

RAND, or RANDN, or RANDI ... but that's assuming it has to do with
generating a random number. From the name, I'd be more inclined to think it
was a rounding-type function and my wild guess at its closest analogue would
be FIX, FLOOR, or ROUND.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us