Strange results of nested vectorize() for nested matrices

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

#1 Objavljeno: 22. 4. 2016. 06:40:34
Mike Kaganski

Mike Kaganski

184 svidjanja u 434 postova.

Grupa: 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) preuzeto 1375 put(ova).
С уважением, Михаил Каганский
#2 Objavljeno: 22. 4. 2016. 16:41:09
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

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

  • Novi postovi
  • Nema novih postova