Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: increase a value each iteration
Date: Wed, 02 Jan 2013 23:41:14 -0600
Organization: Aioe.org NNTP Server
Lines: 36
Message-ID: <kc35lr$un7$1@speranza.aioe.org>
References: <kc34pn$5pn$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: 2CibzTqnux2ggoH9QofcGw.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:785827

On 1/2/2013 11:26 PM, MEXICO wrote:
> hi frieds, i guess this is more a math question than programming, but i have this problem,
>i would like to increase dy a variable y each n iteration values, por example,
>
> i have nmax iteration
>
> nmax=50;
>
> i have diferential values of y
>
> dy=.5
>
> so i do a loop
>
> for i=1:nmax
>
> y(i)= and my question is here. ??
> end
>
> so i want an output like
>
> y(1)=0
> y(2)=.5
> y(3)=1
>
> so on until 50 iteration, so my question is a funcion y(i) that give me a vector of
>dy increments but in function of i. thanks for advance
>

may be

   y=0:0.5:(50*0.5)