Code covered by the BSD License  

Highlights from
ROUND2DP

4.0

4.0 | 3 ratings Rate this file 0 Downloads (last 30 days) File Size: 1.14 KB File ID: #24213

ROUND2DP

by Andrew

 

20 May 2009

Round a number to a given number of decimal places

| Watch this File

File Information
Description

This expands on the operation of the built-in ROUND function to provide functionality to round to a given number of decimal places. For example,

>> round(pi)
ans =
   3

>> round2dp(pi,3)
ans =
    3.142

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
25 Aug 2009 Derek Fryar  
02 Jun 2010 Alexandre  
21 Oct 2010 Gabriel Ruiz  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
round Andrew 20 May 2009 09:21:53
decimal Andrew 20 May 2009 09:21:53
precision Andrew 20 May 2009 09:21:53
decimal places Andrew 20 May 2009 09:21:53

Contact us at files@mathworks.com