Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problam evaluating a simple calculation for a vector of values
Date: Mon, 8 Dec 2008 17:26:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <ghjlba$abl$1@fred.mathworks.com>
References: <ghj6ui$9m9$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228757162 10613 172.30.248.38 (8 Dec 2008 17:26:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 8 Dec 2008 17:26:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:505649


"Arik g" <elalyg@gmail.com> wrote in message <ghj6ui$9m9$1@fred.mathworks.com>...
> .......
> and now the strange thing: when the vector has 1, 2 or 3 values, the claculation results for those values is certain curve. when the vector has 4 or more values, the outcome changes and the same curves and results - corresponding to the values that were in the vector of size 1-3 - are now of different values, and are fluctuating in an increasung increment.
> ......

  It sounds to me as though your problem is possibly that of display and not the numbers' values themselves.  The displayed values for a vector will be arranged to suit the largest value present when they are displayed together.  For example if you are using format short, a two-element array may show the two separate displays of 6.0000 and 6.0000e10, but together they show as:

 1e10 times 0.0000 6.0000

The first element really has the value of 6 but its displayed value looks like a zero in the presence of the 1e10 exponent factor.

Roger Stafford