Strange results of nested vectorize() for nested matrices

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

#1 Pubblicato: 22/04/2016 06:40:34
Mike Kaganski

Mike Kaganski

184 apprezzamenti in 434 post.

Gruppo: 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) scaricato 1341 volta(e).
С уважением, Михаил Каганский
#2 Pubblicato: 22/04/2016 16:41:09
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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

  • Nuovi post
  • Nessun nuovo post