What are the first steps to developing a new toolbox?

Mike Croucher on 11 Mar 2025
Latest activity Reply by Vijay Iyer on 12 Mar 2025

Imagine you are developing a new toolbox for MATLAB. You have a folder full of a few .m files defining a bunch of functions and you are thinking 'This would be useful for others, I'm going to make it available to the world'
What process would you go through? What's the first thing you'd do?
I have my own opinions but don't want to pollute the start of the conversation :)
Vijay Iyer
Vijay Iyer on 12 Mar 2025
👀
cui,xingxing
cui,xingxing on 12 Mar 2025 (Edited on 12 Mar 2025)
in modules.m
function out1 = myfcn1(a,b)
out1 = a+b;
end
function out2 = myfcn2(a,b)
out2 = 2*a+b;
end
function out3 = myfcn3(a,b)
out3 = 3*a+b;
end
in entryPoint.m
from functionalityA import modules
out = myfcn1(2,3)
--------------------------------------------
I believe in organizing folders based on functionality, similar to Python open-source projects, where each directory only contains files specific to that domain. Data files are placed in directories like data/ and images/, while the user entry file is at the top level.
However, Mathworks has developed a tutorial for best practices in creating toolboxes, and for me, the experience is not great because it introduces project files like *prj, which are similar to project files in Visual Studio IDE, making it less intuitive for direct use!