Help Center
Remove dependency from package
Since R2024b
removeDependency(pkg,dep)
removeDependency(pkg,dep) removes the packages in dep from the package pkg and updates the Dependencies property of the package object. The package pkg must be in editable mode.
pkg
dep
Dependencies
example
collapse all
Create packages named MyPackage and MyOtherPackage.
MyPackage
MyOtherPackage
pkg = mpmcreate("MyPackage","C:\MyCode\MyPackage"); dep = mpmcreate("MyOtherPackage","C:\MyCode\MyOtherPackage");
Make MyOtherPackage a dependency of MyPackage.
addDependency(pkg,dep) pkg.Dependencies
ans = Dependency with properties: Name: "MyOtherPackage" VersionRange: "" ID: "6d25ab96-dac2-48a6-836c-64402ca5d8d1" ResolvedVersion: 1.0.0 (1×1 Version)
Remove MyOtherPackage as a dependency of MyPackage.
removeDependency(pkg,dep) pkg.Dependencies
ans = 1×0 Dependency array with properties: Name VersionRange ID ResolvedVersion
matlab.mpm.Package
Package, specified as a matlab.mpm.Package object.
matlab.mpm.PackageSpecifier
matlab.mpm.Dependency
Package dependencies to remove, specified as a string array of package specifiers, a matlab.mpm.PackageSpecifier array, a matlab.mpm.Package array, or a matlab.mpm.Dependency array.
Introduced in R2024b
addDependency
updateDependency
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other bat365 country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office