Strange results of nested vectorize() for nested matrices

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

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

Mike Kaganski

184 likes in 434 posts.

Group: 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 KiB) downloaded 39 time(s).
С уважением, Михаил Каганский
#2 Posted: 4/22/2016 4:41:09 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

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

  • New Posts New Posts
  • No New Posts No New Posts