Path: news.mathworks.com!not-for-mail
From: "Mario " <nospam@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: for loop - variable increment
Date: Wed, 11 Jun 2008 17:18:02 +0000 (UTC)
Organization: UBC
Lines: 27
Message-ID: <g2p1ca$8sa$1@fred.mathworks.com>
Reply-To: "Mario " <nospam@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1213204682 9098 172.30.248.37 (11 Jun 2008 17:18:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 11 Jun 2008 17:18:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1244954
Xref: news.mathworks.com comp.soft-sys.matlab:473325



Hi.
I want to test an algorithm with different values for the input variables.

I thought to call my function inside a for loop but i want to increment the 
input variable with a inconstant increment.

e.g.
for i=0.0001:i:1
   test(i)
end

so the first call would be test(0.0001), the second one test(0.0002), the third 
one test(0.0004), then test(0.0008) and so on.

I tried also the following way
i=0.0001
for j=0.0001:i:1
   test(j)
   i=j;       % or i=2*i;
end

but it doesn't work!
Any help? 

Thank you,

Mario