Strange results of nested vectorize() for nested matrices

Strange results of nested vectorize() for nested matrices - Сообщения

#1 Опубликовано: 22.04.2016 06:40:34
Mike Kaganski

Mike Kaganski

184 сообщений из 434 понравились пользователям.

Группа: 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 КиБ) скачан 39 раз(а).
С уважением, Михаил Каганский
#2 Опубликовано: 22.04.2016 16:41:09
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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

  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений