help-octave
[Top][All Lists]

## Re: problem plotting "N-d object"

 From: Pascal A. Dupuis Subject: Re: problem plotting "N-d object" Date: Mon, 20 Feb 2012 21:11:53 +0100 User-agent: Mutt/1.5.21 (2010-09-15)

```On Sun, Feb 19, 2012 at 10:19:39AM -0800, Sergei Steshenko wrote:
>
> I have just replied Ben and you - the object is 1-d, no size reduction is
> necessary, the root cause/problem is that Octave wrongly considers the object
> to be N-d.
>
> Not dealing with the root cause is losing track IMO.
>

Sergei,

a 1x1xN object is a tensor. It is a subpart of a tensor, and it is a
tensor itself. You just can't blindly remove singletons dimensions. A
(1x5x1) tensor can not be added to a (1x1x5) tensor. They're "kind of"
vectors, the number of elements is the same, yet they are not
compatible with respect to addition.

The root of the problem, as you wrote, is that ML and Octave are
developped in the framework of linear algebra. This requires to have a
vector space as defined at https://en.wikipedia.org/wiki/Vector_space,
with the ability to define and use linear mappings, i.e. matrices. A vector
used in this context must have two dimensions, one of them being
singleton, because A times x (A matrix and x vector) is not the same
as x times A.

You're thinking about vectors as single-dimensional array. This is
correct in a Euclidian perspective, but ML and Octave vectors are used
in a wider context.

This is why
1) ML does not define plotting for N-d objects
2) we either need some new 'squeezable' class, either one-dimensional
array (and vectors) useable in an Euclidian framework but NOT in the
field of linear algebra.

In both cases, there is some work to be done. Are you ready to help ?

Regards

Pascal

--

```

reply via email to