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 - Mathematica Tutorial
From the course: Mathematica 11 Essential Training
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.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Create a list2m 42s
-
(Locked)
Refer to and edit list items5m 29s
-
(Locked)
Add and delete list items4m 27s
-
(Locked)
Count and summarize list items5m 14s
-
(Locked)
Sort and reorder lists4m 36s
-
(Locked)
Identify the first or last item in a list1m 44s
-
(Locked)
Select list items by rule4m 20s
-
(Locked)
Delete duplicate list items2m 15s
-
(Locked)
Join multiple lists into a single list4m
-
(Locked)
-
-
-
-
-
-