From the course: Mathematica 11 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Count and summarize list items

Count and summarize list items - Mathematica Tutorial

From the course: Mathematica 11 Essential Training

Start my 1-month free trial

Count and summarize list items

- [Instructor] When you work with a list of values, you will often be interested in knowing how many values are in the list. After all, if you import data from an Excel file or another data source, you might not know exactly how many values you've brought in. So, in this movie, I will show you how to count how many values are in a list, and also how many occurrences of specific values happen within that list, plus a few other calculations that you might find interesting. I have started a blank Mathematica notebook so I need to enter in a list of values to work with. I'll call it glist = and then I'm enumerating the values in the list so I'll type a left curly bracket, and I'll type in seven values, one, four, one, five, one, seven, eight then a right curly bracket and shift + enter and I see my values as expected. If you want to find the number of items in a list, you can use the length keyword. And I won't assign these values to any variables to keep them, I'll just type the command.…

Contents