From: <HIDDEN>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webx
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to terminate a function?
Message-ID: <ef1b760.2@webx.raydaftYaTP>
Date: Wed, 16 Nov 2005 03:35:39 -0500
References: <ef1b760.-1@webx.raydaftYaTP> <4379e5b5$0$67261$157c6196@dreader2.cybercity.dk> <ef1b760.1@webx.raydaftYaTP>
Lines: 20
NNTP-Posting-Host: 194.167.95.14
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:313878


Abo Bshire wrote:
>
> function a=myfun(b)
> for i=1:b
> i=i+1;
> if i=3
> a=i;
> return
> end
> a=i;
> end;
>

Hi,

The above code is wrong !
Are you new to Matlab ?
Is it just an example ?

Jérôme