Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
It's great to see the symbolic engine being improved. However, it would be nice to see a long-standing symbolic/numeric behavioural alignment problem fixed.
The numeric engine will iterate over a vector in a for loop but the symbolic engine does not, which requires workarounds that make the code more complex than need be. For example,
Stuart
The problem seems to be the local definition of the array. It also fails if the array is a function argument:
It also works OK if the local matrix is used directly
But of course neither a global definition nor using the matrix directly in the for-loop helps in writing utility functions.
@Werner_E wrote:
The problem seems to be the local definition of the array. It also fails if the array is a function argument:
It also works OK if the local matrix is used directly
But of course neither a global definition nor using the matrix directly in the for-loop helps in writing utility functions.
Yes, I first hit the problem back when some tyrannosaurs noticed a rather bright object in the sky one fine Spring day. I often use my vec function to completely flatten arrays (even nested ones). The symbolic version loses the simplicity of the numeric version.
It's annoying enough to have to think once when writing recursive functions, but having to think twice (workaround) has the voices in my head suggesting it's time to start sharpening the broadswords.
(There was a time when I wouldn't have to add a note explaining that the latter is a joke and apologizing ahead of time for inadvertently triggering anyone)
Stuart