Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Incoerences in MATLAB
Date: Thu, 11 Dec 2008 23:37:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <ghs86t$528$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1229038621 5192 172.30.248.35 (11 Dec 2008 23:37:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 11 Dec 2008 23:37:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1637974
Xref: news.mathworks.com comp.soft-sys.matlab:506446

I have discovered some incoerences and troubles in some commands of MATLAB. These problems caused me headaches by the time I have faced them for the first time, because of the loss of several minutes in work until the perception of the problem.

One of this problems, an incoerence, is: try if [125000:125000:10/0.00001] and [125000:125000:1000000] are vectors of the same dimension when generated in MATLAB.

Another problem, a trouble, has to do with the question of numerical precision. Try the following commands:
time = 0; time_increment = 0.01; n = (a number of your choice);
for i = 1:n
    time = time  + time_increment;
end

You will notice that, for large values of "n", some decimal numbers will appear after the second one. This shouldn't happen. I have observed this problem for values of "time_increment" less than 0.1

Thank you for your attention.

Dante Valen?a.