approximation of numbers
Started by ●June 13, 2010
Reply by ●July 8, 20102010-07-08
Not sure if this is the perfect answer but you can try changing the data type
from a double to a uint (unsigned integer)
Cheers,
How we turn for example 2.0000000000003 into 2 only?
>
Cheers,
How we turn for example 2.0000000000003 into 2 only?
>
Reply by ●July 12, 20102010-07-12
Dear Sir,
You should use ROUND function
Round towards nearest integer.
ROUND(X) rounds the elements of X to the nearest integers
I hope this help
Regards,
Ibrahim nasir
--- On Mon, 7/5/10, c...@gmail.com wrote:
From: c...@gmail.com
Subject: [matlab] Re: approximation of numbers
To: m...
Date: Monday, July 5, 2010, 8:15 PM
Not sure if this is the perfect answer but you can try changing the data type from a double to a uint (unsigned integer)
Cheers,
How we turn for example 2.0000000000003 into 2 only?
>
Reply by ●July 12, 20102010-07-12
Use vap or digit 5 command like vap('sqrt(2)'.2)
On 7/5/10, c...@gmail.com wrote:
> Not sure if this is the perfect answer but you can try changing the data
> type from a double to a uint (unsigned integer)
>
> Cheers,
>
> How we turn for example 2.0000000000003 into 2 only?
>
--
Mohd Muqeem
B.Tech.(Electronics)
Dept. of Electronics Engineering
Zakir Hussain College Of Engg. & Tech.
Aligarh Muslim University
Uttar pradesh
India.
Mob. +919808189882 , +919045130940
On 7/5/10, c...@gmail.com wrote:
> Not sure if this is the perfect answer but you can try changing the data
> type from a double to a uint (unsigned integer)
>
> Cheers,
>
> How we turn for example 2.0000000000003 into 2 only?
>
--
Mohd Muqeem
B.Tech.(Electronics)
Dept. of Electronics Engineering
Zakir Hussain College Of Engg. & Tech.
Aligarh Muslim University
Uttar pradesh
India.
Mob. +919808189882 , +919045130940