Message Boards Message Boards

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

Sorting a result

Posted 12 years ago
If I have input and output like the following:





How could I format the result into alphabetical order, and count the number of items?


Thanks
POSTED BY: Fizixx :)
3 Replies
r = AstronomicalData["Jupiter", "Satellites"];
Sort[r]
Length[r]
To make a small table
r = Sort[r];
TableForm[Table[{i, r[[i]]}, {i, Length[r]}]]
POSTED BY: Nasser M. Abbasi
Sort[AstronomicalData["Jupiter", "Satellites"]]
Length[%]
POSTED BY: Frank Kampas
Posted 12 years ago
Hey, yes, that's great, thanks!

I was playing with the "Sort[ ]" function, but I was obviously using it incorrectly, as I was not getting these nice results.

Thanks again!
POSTED BY: Fizixx :)
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