Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Delete elements from columne vectors

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-23-2018
08:29 AM

09-23-2018
08:29 AM

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.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-23-2018
08:51 AM

09-23-2018
08:51 AM

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!

1 REPLY 1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-23-2018
08:51 AM

09-23-2018
08:51 AM

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!