Message Boards Message Boards

0
|
4759 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to ArrayPad a Ragged Array?

Posted 10 years ago

Hi all,

In the attached notebook I have created a ragged array using Table. I also used table to get each row and the number to right-hand side padding. I used Apply on the first entry of the table with the row and the padding parameter and it works. However, when I combine it all in one Apply it does not take the parameters as expected.

How do I get it to take the list and padding parameter as I expect so that I get the ragged table right-hand side padded?

Many thanks,

Edmund

Attachments:
POSTED BY: Edmund Robinson
2 Replies
Posted 10 years ago

Hummm .... Apparently this can all be done with a simple command; PadRight[t, {3, 3}]. Oh well, it was an interesting exercise. LOL

POSTED BY: Edmund Robinson
Posted 10 years ago

Ah, I kept looking and found the answer. I needed to add the levelspec parameter to the Apply function. The default is {0} and I needed to specify {1}.

Edmund

POSTED BY: Edmund Robinson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract