SMath Studio Forum
»
SMath Studio
»
Questions
»
Reverse breaks vectorize function
Rank: Newbie
Groups: Registered
Joined: 08/04/2024(UTC) Posts: 1
|
Why does this work? LEDCalc.sm (11kb) downloaded 11 time(s).But when I reverse V_fwd, it throws an error (argument can not be scalar): LEDCalc_reverse.sm (11kb) downloaded 10 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 284 Location: Cali, Colombia Was thanked: 119 time(s) in 81 post(s)
|
The reverse() function must be applied on matrix or vectors. When you vectorize the expression: the vectorize function applies reverse() to each element of V.fwd, not to all vector V.fwd, so to solve this, you must apply reverse() to vector V.fwd, and then use in the vectorized calculation: Best, Oscar
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Reverse breaks vectorize function
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.