Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi!
I have written a function i call "STACK(A)" that takes a column vector, and loops through it and stacks all non zero elements in a new column vector.
My problem is the output, the new column vector is displayed as:
Any suggestions on how to get a new normal column vector like the "IntendedOutput"
Regards 😄
Sigurd
Solved! Go to Solution.
Simply omit the "stack" command and you get the output you expect!
Find also some less elaborate routines below - their output differs if the input vector consists of zeros only!
Simply omit the "stack" command and you get the output you expect!
Find also some less elaborate routines below - their output differs if the input vector consists of zeros only!