Skip to content
Snippets Groups Projects
Commit 0ab81e52 authored by LexvanGastel's avatar LexvanGastel
Browse files

voeg mijn code toe

parent 25874221
No related branches found
No related tags found
No related merge requests found
import scipy.io
def load_emg_data(file_path):
mat_data = scipy.io.loadmat(file_path)
if 'emg_data_walking' not in mat_data:
raise KeyError("De verwachte variabele 'emg_data_walking' is niet in het bestand aanwezig.")
emg_data = mat_data['emg_data_walking']
channel_names = emg_data['data_headers'][0][0]
channel_names = [ch[0] for ch in channel_names[0]]
print("EMG-kanalen:")
for idx, name in enumerate(channel_names, start=1):
print(f"{idx-1}. {name}")
return channel_names
file_path = "emg_data_walking.mat"
load_emg_data(file_path)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment