Path: news.mathworks.com!newsfeed-00.mathworks.com!news-hog.berkeley.edu!ucberkeley!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!5f968bd6!not-for-mail
From: ellieandrogerxyzzy@mindspring.com.invalid (Roger Stafford)
Newsgroups: comp.soft-sys.matlab
Subject: Re: fraction instead of decimal
Message-ID: <ellieandrogerxyzzy-0706052136110001@pool0357.cvx20-bradley.dialup.earthlink.net>
References: <ef0a03f.-1@webx.raydaftYaTP>
Organization: -
Lines: 17
Date: Wed, 08 Jun 2005 04:36:11 GMT
NNTP-Posting-Host: 209.179.251.102
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread2.news.pas.earthlink.net 1118205371 209.179.251.102 (Tue, 07 Jun 2005 21:36:11 PDT)
NNTP-Posting-Date: Tue, 07 Jun 2005 21:36:11 PDT
Xref: news.mathworks.com comp.soft-sys.matlab:283551



In article <ef0a03f.-1@webx.raydaftYaTP>, Jimmy <ccwang22@gmail.com> wrote:

> Is it possible to display the result in fraction instead of decimal?
> For example 1/10 instead of 0.1.
> 
> Thanks
------
  Try 'rats'.  It might do what you want.

s = rats(1.357)

s =

  1357/1000

(Remove "xyzzy" and ".invalid" to send me email.)
Roger Stafford