Skip to content

This repo is a tutorial comparing Matlab and numpy (a python library) in signal analysis. Data and Matlab code obtained from the lecture of Dr Chia-Feng Lu. The corresponding python code is provided to help readers to learn how to use free numpy, scipy and scikit-learn library in python to conduct signal analysis tasks.

Notifications You must be signed in to change notification settings

zht007/matlab_vs_numpy

Repository files navigation

Overview

This repo is a tutorial comparing Matlab and numpy (a python library) in signal analysis. Data and Matlab code obtained from the lecture of Dr Chia-Feng Lu. The corresponding python code is provided to help readers to learn how to use free numpy, scipy and scikit-learn library in python to conduct signal analysis tasks.

You can click Open In Colabto open the notebook of the python version in Colab and exclude the code there directly.

Table of Contents

01_Basic_operations

Basic_operations_matlab.ipynb

Basic_operations_python.ipynbOpen In Colab

02_Signal_preprocessing_resample_and_segment

Resample_and_segment_matlab.ipynb

Resample_and_segment_python.ipynbOpen In Colab

03_Signal_normalisation_and_event_detection

Normalization_and_event_detection_matlab.ipynb

Normalization_and_event_detection_python.ipynbOpen In Colab

04_Fourier_transform

ECG_data_analysis_FFT_and_welch_method_matlab.ipynb

ECG_data_analysis_FFT_and_welch_method_python.pynbiOpen In Colab

05_FIR_and_IIR_filters

FIR_and_IIR_filter_matlab.ipynb

FIR_and_IIR_filter_python.ipynbOpen In Colab

06_Time_frequency_analysis

FIR_and_IIR_filter_python.ipynb

FIR_and_IIR_filter_python.ipynbOpen In Colab

07_PCA_and_ICA_analysis

PCA_and_FastICA_matlab.ipynb)Open In Colab

PCA_and_fastICA_python.ipynb

How to Use Jupyter nootbook with matlab

1. install python, matlab

The matlab software and Python need to be installed.

matlab currently only supports python 3.8 and below

2. install matlab_kernel

pip install matlab_kernal

3. Configure matlab_kernal

  1. cd to the Matlab installation directory (C:\Program Files\MATLAB for Windows)
  2. cd to MATLAB\(current version directory)\extern\engines\python
  3. execute the python setup.py install command

4. install jupyter notebook or jupyter lab

pip install notebook

5. Start jupyter notebook

jupyter notebook

If you open jupyter notebook in your browser and select malab in the kernel, you can use matlab in jupyter notebook just like python.


Reference:

begin_matlab/00. Introduction.ipynb at master · APMonitor/begin_matlab · GitHub

About

This repo is a tutorial comparing Matlab and numpy (a python library) in signal analysis. Data and Matlab code obtained from the lecture of Dr Chia-Feng Lu. The corresponding python code is provided to help readers to learn how to use free numpy, scipy and scikit-learn library in python to conduct signal analysis tasks.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published