Strange results of nested vectorize() for nested matrices

Strange results of nested vectorize() for nested matrices - Mensajes

#1 Publicado: 22/4/2016 6:40:34
Mike Kaganski

Mike Kaganski

184 me gusta en 434 mensajes.

Grupo: User

I observe strange results from using constructs like vectorize(vectorize(M)), where M is a matrix which elements are matrices.
Could someone explain the logic? Or is this a bug?

nested-vectorize.png

nested-vectorize.sm (18,68 KiB) descargado 1336 vez(es).
С уважением, Михаил Каганский
#2 Publicado: 22/4/2016 16:41:09
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Mike,

Your M matrix is a collection of items. Mathematica defines as 'cell array'
Matlab defines MDA [Multi Dimensional Array]
The vectorie operator must have at least two arguments to produce.
You are attempting to vectorise M over itself, a non sense in some way.
Try to multiply M*N, where 'N' will be of similar construct of different
values and put that under the vectorise operator. You should get result.

Jean

Forum Vectorise Array.gif

  • Nuevos mensajes
  • Sin mensajes nuevos