Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline mikekaganski  
#1 Posted : 22 April 2016 12:40:34(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
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 (19kb) downloaded 18 time(s).

Edited by moderator 20 May 2016 21:18:42(UTC)  | Reason: marked as issue

Best regards,
Mike Kaganski

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 22 April 2016 22:41:09(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
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

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.