Message Boards Message Boards

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

Sorting a result

Posted 10 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
Posted 10 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 :)
Sort[AstronomicalData["Jupiter", "Satellites"]]
Length[%]
POSTED BY: Frank Kampas
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
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