DSPRelated.com
Forums

Array indexing in Matlab finally corrected after 30 years!

Started by Max April 1, 2015
On Wed, 08 Apr 2015 09:52:02 -0400, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>AND, with that, we might have origins that are negative so that we can >cleanly represent negative frequency in the Fourier transform and >negative time for non-causal impulse responses. > >it's without excuse.
There's my headline for Apr 01, 2016: "By popular demand, Matlab array indexes will now start from negative infinity. A[1] will refer to the element at A[-infinity + 1], etc." That will solve all those problems with Fourier transforms, as long as your machine has a lot of memory. (Actually, your idea about a selectable starting index is great, rbj)
On 4/9/15 12:41 AM, Max wrote:
> On Wed, 08 Apr 2015 09:52:02 -0400, robert bristow-johnson > <rbj@audioimagination.com> wrote: > >> AND, with that, we might have origins that are negative so that we can >> cleanly represent negative frequency in the Fourier transform and >> negative time for non-causal impulse responses. >> >> it's without excuse. > > There's my headline for Apr 01, 2016: > "By popular demand, Matlab array indexes will now start from negative > infinity. A[1] will refer to the element at A[-infinity + 1], etc." > > That will solve all those problems with Fourier transforms, as long as > your machine has a lot of memory. > > (Actually, your idea about a selectable starting index is great, rbj)
it was the original idea from 2 decades ago. https://groups.google.com/forum/#!original/comp.soft-sys.matlab/2J15oSvPTGQ/JpPiJVUgItwJ the thread and context is https://groups.google.com/forum/#!msg/comp.soft-sys.matlab/2J15oSvPTGQ/JpPiJVUgItwJ at that time i was able to get Cleve to notice and respond. not so anymore. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Thu, 09 Apr 2015 00:41:47 -0400, Max <Max@sorrynope.com> wrote:

>"By popular demand, Matlab array indexes will now start from negative >infinity. A[1] will refer to the element at A[-infinity + 1], etc." > >That will solve all those problems with Fourier transforms, as long as >your machine has a lot of memory.
Finally I can implement those ideal lowpass filters.
robert bristow-johnson <rbj@audioimagination.com> wrote:
> On 4/8/15 8:30 AM, Randy Yates wrote:
(snip)
>> MATLAB = MATRIX Laboratory. So the same reason mathematicians >> number their elements a_11, a_12, ..., a_21, a_22, etc. Blame >> the mathematician who started THAT convention!
> yeah, but they're not always matrices.
It took Fortran 20 years before it allowed one to specify the origin. I haven't used Matlab so much lately, but doesn't the zero subscript have another meaning? Or negative subscripts? I might be thinking of R, which I have used more recently.
> in fact, the largest-selling > MATLAB toolbox is the Signal Processing Toolbox. i might venture a > guess that the largest portion of MATLAB users are EE's doing signal > processing. for EE's doing signal processing, i'm sure the vast > majority of the time, they are "mere" *arrays* not matrices where we are > doing matrix arithmetic. probably most other users of MATLAB use it for > general math use and matrix math is used, maybe, 30% of the time.
(snip) -- glen