The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Choose Decimal Places
Replies: 1   Last Post: Feb 6, 2013 6:40 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Nasser Abbasi

Posts: 6,677
Registered: 2/7/05
Re: Choose Decimal Places
Posted: Feb 6, 2013 6:40 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 2/6/2013 5:28 PM, Abdul wrote:
> Hello,
> I have problem with decimal point. I need to output a variable with just
>two decimal points. I am using fprintf to output the variable.


EDU>> fprintf('%3.2f\n',pi)

EDU>> fprintf('%3.16f\n',pi)

doc fprintf for more info

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.