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:
rounding a number

Subject: rounding a number

From: samira

Date: 5 Jul, 2011 01:37:09

Message: 1 of 2

Hi all
In matlab "round" function always round numbers to nearest integers.

How can I round a number like 0.19 to 0.2?

It is possible?

Thanks

Subject: rounding a number

From: TideMan

Date: 5 Jul, 2011 03:15:00

Message: 2 of 2

On Jul 5, 1:37 pm, "samira " <samira.rash...@gmail.com> wrote:
> Hi all
> In matlab "round" function always round numbers to nearest integers.
>
> How can I round a number like 0.19 to 0.2?
>
> It is possible?
>
> Thanks

round(10*x)/10

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