Search
Description
The requested feature is to extend linear indexing to the assignments
smath (Monday, April 18, 2016 11:47 PM) #
Thank you!
Fixed (see attachment).
Davide (Monday, April 18, 2016 12:37 PM) #
Yes, it should be considered a bug. Just pointed out what happens.
I'm unsure if would be better to open a new issue and mark it as related or change this one.
Mike Kaganski (Monday, April 18, 2016 2:15 AM) #
Well, that's only true for assignment; there is inconsistency when the value is taken from an element and when it's put into an element using linear indexing. In former case, usual indexing is used (third element of 2x2 matrix is first element of second row), while in latter, the system that you described is used. That's why it's currently a BUG.
Davide (Sunday, April 17, 2016 8:26 PM) #
seems that it is assumed el(2)=el(matrix,row_number), with column_number always equal to 1; (applies also to row vectors).
Mike Kaganski (Sunday, April 17, 2016 4:17 PM) #
As of 0.98.5950, this kind of "works", but wrong way.
a:mat(1,2,3,4,2,2)
el(a,3)=3
el(a,3):10
a=mat(1,2,3,4,10,0,3,2)