Difference between methods of copying a simulink parameter

조회 수: 6 (최근 30일)
Pranav Arya
Pranav Arya 2019년 3월 6일
답변: Patel Mounika 2019년 3월 12일
I wanted to confirm, if the two methods described below have the same functionality or if there is some difference.
Method 1
a=Simulink.Parameter;
a.Value=5;
b=a;
Method 2
a=Simulink.Parameter;
a.Value=5;
b=a.copy;
Thanks in advance.

답변 (1개)

Patel Mounika
Patel Mounika 2019년 3월 12일
Yes, there is a difference between the two methods. In the first method you are creating a reference to the same object but in the second method, you are creating a new Simulink Parameter object from the existing one.
You can refer to the below thread.
Hope this helps.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by