octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opinions for linspace behavior


From: Mike Miller
Subject: Re: Opinions for linspace behavior
Date: Wed, 26 Aug 2015 17:23:53 -0400

On Wed, Aug 26, 2015 at 22:11:35 +0100, Carnë Draug wrote:
> However, suppose some code which gets an arbitrary number of base values
> in a row vector (so each new vector is a column vector).  When this program
> gets a single base value, linspace() will suddenly return a single row
> vector instead of the expected single column vector.  So we'd have to add an
> extra option to specify dimension.  I'm not sure if it's worthy the extra
> complication.  Specially since the function documentation is pretty explicit
> on returning row vectors.

I was thinking along the same lines, the expectation is that linspace
returns a row vector, so shouldn't an array of start indices return a
corresponding number of rows? I don't feel really strongly about it
though, I'd probably personally prefer arrayfun or broadcasting to
give similar results to this extension anyway.

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]