Example of using MPM with namespace

5 次查看(过去 30 天)
scivision
scivision 2025-11-7
回答: Leepakshi 2025-11-12
I have a collection of functions in a Matlab namespace +stdlib. I would like to distribute these to R2024b+ Matlab users via mpminstall.
I use Matlab namespaces with a +stdlib/ folder to allow using functions in numerous 3rd party programs while avoiding function namespace collisions. Currently I distribute the code via Git. I would like to try the MPM packaging if it's feasible.
However, it seems that packaging namespaces is not supported; on using mpmcreate() I get errors like
File mpackage.json, Line: 17, Column: 10 Special folder '+stdlib' is not supported as a package root or member folder.

回答(1 个)

Leepakshi
Leepakshi 2025-11-12
Hi,
Based on the naming convention mentioned in https://www.mathworks.com/help/matlab/ref/mpmcreate.html?s_tid=srchtitle_support_results_1_mpmcreate, package display name should be a string scalar.
MATLAB’s MPM packaging does not support +namespace folders (like +stdlib), you can try renaming it without a "+" sign.
Hope it helps!
Thanks

类别

Help CenterFile Exchange 中查找有关 Source Control 的更多信息

标签

产品


版本

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by