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$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1229038621 5192 (11 Dec 2008 23:37:01 GMT)
NNTP-Posting-Date: Thu, 11 Dec 2008 23:37:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1637974
Xref: 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;

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.