Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
How could I remove zeros from the nested array M?, the file generated in mathcad 15 is attached.
Thanks.
Solved! Go to Solution.
What you are looking for is twofold!
You don't just want to filter the zeros but you also want to combine all nested subvectors into a single one.
What should happen, if a subvector contains a zero, too?
I guess it should be filtered, too - right?
What you are looking for is twofold!
You don't just want to filter the zeros but you also want to combine all nested subvectors into a single one.
What should happen, if a subvector contains a zero, too?
I guess it should be filtered, too - right?
There are many ways to skin a cat. Here is an attempt using a recursive function to deal even with deeply nested arrays:
Mathcad 15 worksheet attached
I really appreciate the solution, thanks.
I had to modify my unravel function because it returns an undesired result in case of one of the inner matrices contains all zeros:
Here is the improved version:
Thank you very much again.