Intro to Python Imports and Modules for Matlab users
August 3, 2024
When you write a function in MATLAB, each function typically is a single .m
file. So let’s say you’ve written my_function()
and saved that function as my_function.m
.
To gain access to this function, you would use the addpath
function to add that script to your MATLAB’s search path. After calling addpath(/path/to/myfolder/)
, which contains myfunction.m
, then you can call my_function()
. How do these function imports work in Python?