Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!c41g2000yqm.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Prevent MatLab from Rounding the Values in a Matrix
Date: Wed, 15 Jun 2011 22:09:25 -0700 (PDT)
Organization: http://groups.google.com
Lines: 23
Message-ID: <1c446dcb-629b-4ce0-92de-11ead7374bd5@c41g2000yqm.googlegroups.com>
References: <itc2l4$aks$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: 195.18.217.10
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1308200965 22504 127.0.0.1 (16 Jun 2011 05:09:25 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 16 Jun 2011 05:09:25 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: c41g2000yqm.googlegroups.com; posting-host=195.18.217.10; posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: ARLEUHCNK
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
 2.0.50727; InfoPath.2; MS-RTC LM 8; .NET CLR 1.1.4322),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:732135

On Jun 16, 7:00 am, "Kevin Ellis" <kevin.elli...@gmail.com> wrote:
> Hello,
>
> In MatLab I have created a 5x5 matrix where in each entry there is a specific equation with different variables. The equations in entry range greatly in terms of the calculated values. For example one entry will be equal to 10.3468 and the next entry will be equal to 5.391106*10^-6. Now the problem I am having is that when I create the matrix using variables inside the matrix the values that are output are rounded off. The entry in the matrix that was equal to 10.3468 displays perfectly, but the entry that was equal to 5.391106*10^-6 simply shows zero. Thus my question is if there is a way to make MatLab, when calculating the matrix, output these small values instead of rounding to zero? I have tried using 'double' but with no luck. I would like to get a matrix with values that are in a format similar to what you would see on a TI-83. Thanks for the help, sorry if the question is
> confusing.
>
> Kevin

doc format
doc sprintf

Rune