SMath Studio Forum
»
SMath Studio
»
Questions
»
vectorise() go to deep without first calculating the matrix product
Rank: Newbie
Groups: Registered
Joined: 23/06/2019(UTC) Posts: 2
|
I think the vectorize() command goes too deep in the example. Probably it takes the first row from the first matrix, then it probably tries to multiply it with the second vector. Then I get the error message: Number of rows and/or columns of matrices or vectors do not match. I think it should multiply the matrices first and then apply the comparison per line. Can somebody take a look at this, please? matrix_nested_function.sm (12kb) downloaded 7 time(s).Edited by user 16 August 2019 19:45:23(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 14/10/2015(UTC) Posts: 308
Was thanked: 77 time(s) in 58 post(s)
|
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 276 Was thanked: 91 time(s) in 57 post(s)
|
|
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 23/06/2019(UTC) Posts: 2
|
Thank you both for the quick answer! I didn't know there was an eval() function. I now understand that SMath resolves everything as low as possible and then calculates in one go. The use of eval() in the right place prevents this.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: manti7 I think it should multiply the matrices first and then apply the comparison per line. Maybe you complicate matters or not make it simpler from the truth table.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
vectorise() go to deep without first calculating the matrix product
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.