Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: help on eigen values Date: Wed, 11 May 2011 15:34:05 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 18 Message-ID: <iqea9d$95m$1@newscl01ah.mathworks.com> References: <iqcevu$mqk$1@newscl01ah.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: www-01-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: newscl01ah.mathworks.com 1305128045 9398 172.30.248.46 (11 May 2011 15:34:05 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Wed, 11 May 2011 15:34:05 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:726230 "meena rao" <meenaraos@yahoo.co.in> wrote in message <iqcevu$mqk$1@newscl01ah.mathworks.com>... > ...... > Is the value in the workspace of lamda1 is right. ..... > ...... - - - - - - - - - Meena, it is very important for Matlab users to understand the difference between the actual binary floating point value of a quantity stored within memory and a displayed approximate decimal representation of that quantity. The stored value is what is actually used in computation, while the displayed value is only an approximate indication of its value for the user's benefit. As John has indicated, the accuracy of such displays is controlled by the 'format' setting. The default "format short" gives four digits after the decimal point while "format long" for example gives about 14 places after the decimal point (for 'double' numbers.) The only one of the 'format' settings that is guaranteed to give the precise value is "format hex", but unfortunately that is difficult to interpret for persons accustomed to decimal numbers. Here's an example using the quantity 'pi'. With the default "format short" it is displayed as "3.1416", with "format long" it is shown as "3.14159265358979", and with "format hex" it appears as a rather mysterious "400921fb54442d18". Only this last is a precise representation of the true stored value. If this were given as a binary fraction it would be the mind-boggling 53-bit number: 1.1001001000011111101101010100010001000010110100011000 and this is what actually would be used in computation with 'pi'. This should show you why more compact representations are desirable for display purposes. (Of course, since the true mathematical pi is a transcendental number, even the above binary number is only an approximation accurate to 53 bits - the best that double precision floating point can do.) Roger Stafford