disconnect
Description
removes the connections listed in newPipeline = disconnect(pipeline,connections)connections from the pipeline
pipeline.
Examples
Create a pipeline with two components and display the connections.
featureSelector = featureSelectionClassificationMRMRComponent; knnClassifier = classificationKNNComponent; pipeline = series(featureSelector,knnClassifier); pipeline.Connections
ans =
7×2 table
Source Destination
______________________________________________ ______________________________________
"X" "FeatureSelectionClassificationMRMR/X"
"Y" "FeatureSelectionClassificationMRMR/Y"
"FeatureSelectionClassificationMRMR/XSelected" "ClassificationKNN/Predictors"
"Y" "ClassificationKNN/Response"
"ClassificationKNN/Predictions" "Predictions"
"ClassificationKNN/Scores" "Scores"
"ClassificationKNN/Loss" "Loss"
The XSelected output of the
FeatureSelectionClassificationMRMR component is connected to the
Predictors input of the ClassificationKNN
component.
Disconnect the two ports. View the pipeline.
newPipeline = disconnect(pipeline, ... ["FeatureSelectionClassificationMRMR/XSelected", ... "ClassificationKNN/Predictors"]); view(newPipeline)

XSelected is disconnected from the Predictors
input of the KNN component.
Input Arguments
Existing pipeline, specified as a LearningPipeline object.
Names of the connections to remove, specified as a string array or cell array of
character vectors, indicating ordered pairs of sources and destinations, or a table with
two columns (Source and Destination). The format
of connections must be the same as the format of the
Connections property of the pipeline. You can find the name of a
component in a pipeline by using the describe
object function (for example, describe(pipeline)).
describe also displays the component input and output port
names.
Data Types: string | cell | table
Output Arguments
Pipeline with connections removed, returned as a LearningPipeline
object.
More About
You can specify component ports as string scalars or character vectors of the form
componentName/portName, where componentName is the
name of the component, and portName is the name of the port.
When specifying ports of the existing pipeline (pipeline), specify
the port name only.
Version History
Introduced in R2026a
See Also
MATLAB Command
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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)