close - Close profile - MATLAB (original) (raw)
Main Content
Syntax
Description
close([profile](#mw%5F5ae5c081-d846-4bcb-b62c-7b3e355c7878%5Fsep%5Fmw%5F73d78862-b7e6-40f6-94d5-96768f6c6121),[force](#mw%5Ff6aade7a-1b31-4428-900f-6c46ca357672))
closes the profile and deletes it from the workspace. If there are any unsaved changes, you will receive an error unless the argument force
is set totrue
.
Tip
Use closeAll to force close all loaded profiles.
Examples
Create a profile for latency characteristics and save it.
profile = systemcomposer.profile.Profile.createProfile("LatencyProfile");
latencybase = profile.addStereotype("LatencyBase"); latencybase.addProperty("latency",Type="double"); latencybase.addProperty("dataRate",Type="double",DefaultValue="10");
connLatency = profile.addStereotype("ConnectorLatency",... Parent="LatencyProfile.LatencyBase"); connLatency.addProperty("secure",Type="boolean"); connLatency.addProperty("linkDistance",Type="double");
nodeLatency = profile.addStereotype("NodeLatency",... Parent="LatencyProfile.LatencyBase"); nodeLatency.addProperty("resources",Type="double",DefaultValue="1");
portLatency = profile.addStereotype("PortLatency",... Parent="LatencyProfile.LatencyBase"); portLatency.addProperty("queueDepth",Type="double"); portLatency.addProperty("dummy",Type="int32");
profile.save
Force close profile and attempt to inspect it.
profile.close(true) profile
profile =
handle to deleted Profile
Input Arguments
Whether to force close profile, specified as 1
(true
) to close the profile without saving or 0
(false
). to be prompted to save the profile before closing.
Data Types: logical
More About
Version History
Introduced in R2019a
See Also
Tools
Blocks
Objects
- systemcomposer.profile.Profile | systemcomposer.profile.Stereotype | systemcomposer.profile.Property
Functions
- systemcomposer.profile.Profile.createProfile | systemcomposer.loadProfile | applyProfile | removeProfile | renameProfile | systemcomposer.profile.editor | systemcomposer.profile.Profile.find | systemcomposer.profile.Profile.load | save | open | systemcomposer.profile.Profile.closeAll | systemcomposer.profile.Stereotype.find | getDefaultStereotype | setDefaultStereotype | getDefaultElementStereotype | setDefaultElementStereotype | addStereotype | removeStereotype | getStereotype | applyStereotype | batchApplyStereotype | getStereotypes | changeStereotype | removeStereotype | hasStereotype | addProperty | removeProperty | hasProperty | setProperty | getProperty | getPropertyValue | getEvaluatedPropertyValue | getStereotypeProperties | applyStereotypeOrder | getStereotypeNamesByOrder | increaseStereotypeOrder | decreaseStereotypeOrder