Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
College aantekeningen

3D movement analysis: introduction to python + colleges

Beoordeling
-
Verkocht
-
Pagina's
11
Geüpload op
25-03-2026
Geschreven in
2025/2026

Aantekeningen van cursussen introduction to python en intermediate python en aantekeningen van de colleges van 3d movement analysis.

Voorbeeld van de inhoud

Introduction to Python

IPython shell: place where you can type Python code and immediately see the results
Python script: text files with the extension .py -> list of Python commands that are executed ->
you need print() to see the answer
General
- Text files: -.py
- Use print() to generate output from script
- Multiply: *
- Square: **

Data types
- type(): to check what kind of type is the variable
- Float: represent a real number (can be an integer part and a fractional part, use a
point) -> float
- Integer: represents a whole number -> int
- String: represent text (you can use double and single quotes)-> str
- Boolean: True or False (capitalization is important) -> bool
- Different type = different behavior!

Python list
- [a, b, c ]: list, a collection of values (with a komma) -> contain any type and different
types
- You can use sublists


Subsetting lists
- First element is 0, second element is 1 etc.
- You can also call the last element -1 etc.
- Slicing: [start : end] -> the first element is included, the last is excluded ([3:5] means the
fourth and the fifth)
- You can also leave the start or end, then python takes it from the beginning or the end


Manipulating lists
- Change, add and remove list elements
- Fam[7] = 1.86 -> change the 8th element to another number
- Fam[0:2] = [“Lisa”, 1.74] -> change the two first elements
- List + list = pastes together in a single list
- del fam[2] -> remove the third element

,Functions
- Type()
- Function: piece of reusable code, solves particular task, call function instead of writing
code yourself
- max() -> to calculate maximum value in the list
- round() -> inputs are which number you want to round and how many digits, you
separate them with a comma, if you don’t specify the number of digits python rounds to
the closest integer
- len() -> to get the length of the list


Methods
- Methods: functions that belong to objects
- Index of a list: fam.index(“mom”) #calling the index of mom in the list fam
- fam.count(1.73) -> counting the times 1.73 is in the list
- sister.capitalize(“z”, “sa”) -> replaces the z with sa in a string
- Objects have methods associated, depending on type
- fam.append(“me”) -> adds me to the list
- place.upper() -> gives you capital letters
-

Packages
- Each script = module
- You need to install the packages:
- Download get-pip.py
- Terminal: python3 get-pip.py
- Pip3 install numpy
- Import package
- Import numpy
- nump.array([1, 2, 3])
- Import numpy as np
- np.array([1, 2, 3])
- From numpy import array -> only import the array function from the numpy
package

NumPy
- Calculations over entire arrays
- Easy and fast
- Installation: pip3 install numpy
- Import numpy as np
- NumPy arrays: only one type
- Als je nu np.array + np.array doet gaat ie wel elk getal optellen, bij array + array gaat hij
de getallen aan de lijst toevoegen

, Type of NumPy arrays
- numpy.ndarray : n dimensional package
- Np_2d -> 2d array
- Np_2d.shape -> gives the shape of the array
- Np_2d[0][2] -> gives the index of the first row, third column -> also an option: np_2d[0, 2]
- Np_2d[:, 1:3] -> gives you every row and the second to third column
- Np_2d[1, :] -> gives the full second row
- print(np_baseball.shape) -> geeft aantal rijen en kolommen

NumPy: basic statistics
- np.corrcoef() -> to check if things are correlated
- np. std() -> for standard deviation
- np.mean() -> for mean
- np.median() -> for median
- Np enforce single data type -> speed


Intermediate python
Data visualization:
- Very important in data analysis
- Explore data
- Report insights

Matplotlib
- Import matplotlib.pyplot as plt
- Year = [1950, 1970, 1990, 2010]
- Pop = [2.519, 3.692, 5.263, 6.972]
- plt.plot(year, pop)
- plt.show() -> shows the plot

Scatter plot
- plt.scatter(year, pop) -> makes a scatterplot instead of a line plot
- Plt.show
- plt.xscale(‘log’) -> makes it on a logarithmic scale

Histogram
- Explore dataset
- Get idea about distribution
- Import matplotlib.pyplot as plt
- help(plt.hist) -> x = list of values, second argument = bins
- Plt.hist(values, bins = 3) -> 3 bins
- Plt.show
- plt.clf() -> cleans a little bit

Customization

Documentinformatie

Geüpload op
25 maart 2026
Bestand laatst geupdate op
25 maart 2026
Aantal pagina's
11
Geschreven in
2025/2026
Type
College aantekeningen
Docent(en)
Vegter
Bevat
Alle colleges
€6,42
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
dyanne04

Maak kennis met de verkoper

Seller avatar
dyanne04
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
4 jaar
Aantal volgers
0
Documenten
2
Laatst verkocht
-

0,0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen