Path: news.mathworks.com!not-for-mail
From: "Susan Montag" <Sm@werew.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: numbers
Date: Fri, 12 Mar 2010 16:01:22 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 56
Message-ID: <hndogi$h33$1@fred.mathworks.com>
References: <hndar5$m05$1@fred.mathworks.com> <f498f1f5-5153-4163-99f2-913e40b820fc@q21g2000yqm.googlegroups.com> <hndi1d$kg7$1@news.eternal-september.org> <hndj3g$gpb$1@fred.mathworks.com> <hndmag$7h5$2@news.eternal-september.org> <hndntq$84c$1@fred.mathworks.com>
Reply-To: "Susan Montag" <Sm@werew.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1268409682 17507 172.30.248.37 (12 Mar 2010 16:01:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 12 Mar 2010 16:01:22 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2261721
Xref: news.mathworks.com comp.soft-sys.matlab:616296

"Susan Montag" <Sm@werew.com> wrote in message <hndntq$84c$1@fred.mathworks.com>...
> dpb <none@non.net> wrote in message <hndmag$7h5$2@news.eternal-september.org>...
> > Susan Montag wrote:
> > > Ok thanks.
> > > 
> > > Now I'm getting:
> > > 
> > > list = 2 3 4 5
> > > 
> > > You know how to get
> > > 
> > > list = 2
> > >        3
> > >        4
> > >        5
> > > 
> > > instead?
> > 
> > help punct
> > help transpose
> > 
> > Read the "Getting Started" section...
> > 
> > --
> 
> 
> I already used transpose, but I can't get get it fixed:
> 
> The real function is:
> function list = numbers (a, b, c, d)
> 
> I have to calculate the numbers between a and b AND between c and d.
> So when I type "list = numbers(2, 5, 1, 4)" a list like this should appear:
> 
> 2 1
> 3 2
> 4 3
> 5 4
> 
> So the problem is that I can't get it like this.

list = linspace (i1, i2, i2-i1+1)';

gives the result:

2
3
4
5

While I need

2  1
3  2
4  3
5  4