Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

setoptions

plot options 핸들 또는 plot options 속성 설정

설명

setoptions를 사용하여 plot 핸들 옵션 또는 속성 목록을 설정할 수 있으며 축 레이블, 제한, 단위를 수정하는 등 플롯을 사용자 지정할 수도 있습니다. 각 플롯 유형에 사용 가능한 속성과 값의 목록은 Properties and Values Reference (Control System Toolbox) 항목을 참조하십시오. plot 핸들을 사용하여 기존 플롯을 사용자 지정하려면 다음을 수행합니다.

  1. plot 핸들을 구합니다.

  2. getoptions를 사용하여 옵션 세트를 구합니다.

  3. setoptions를 사용해 플롯을 업데이트하여 필요한 옵션을 수정합니다.

자세한 내용은 Customizing Response Plots from the Command Line (Control System Toolbox) 항목을 참조하십시오.

예제

setoptions(h,p)는 plot 핸들 h와 플롯 옵션 정보가 포함된 plot options 핸들 p를 사용하여 응답 플롯의 기본 설정을 지정합니다.

예제

setoptions(h,'property1','value1',...,'propertyN','valueN')은 plot options 핸들 p를 사용하는 대신 속성-값 쌍에 값을 할당합니다. 각 플롯 유형에 사용 가능한 속성과 값의 목록은 Properties and Values Reference (Control System Toolbox) 항목을 참조하십시오.

setoptions(h,p,'property1','value1',...,'propertyN','valueN')은 먼저 plot options 핸들 p를 사용하여 속성을 할당한 다음, 지정된 속성-값 쌍에 영향을 받는 모든 속성을 재정의합니다. 각 플롯 유형에 사용 가능한 속성과 값의 목록은 Properties and Values Reference (Control System Toolbox) 항목을 참조하십시오.

예제

모두 축소

이 예제에서는 입력 3개, 출력 3개, 상태 3개인 MIMO 상태공간 모델이 있다고 가정하겠습니다. 빨간색 그리드 선으로 임펄스 플롯을 만듭니다.

MIMO 상태공간 모델 sys_mimo를 만듭니다.

J = [8 -3 -3; -3 8 -3; -3 -3 8];
F = 0.2*eye(3);
A = -J\F;
B = inv(J);
C = eye(3);
D = 0;
sys_mimo = ss(A,B,C,D);
size(sys_mimo)
State-space model with 3 outputs, 3 inputs, and 3 states.

plot 핸들 h를 사용하여 임펄스 플롯을 만들고 사용 가능한 옵션 목록을 얻기 위해 getoptions를 사용합니다.

h = impulseplot(sys_mimo)

Figure contains 9 axes objects. Axes object 1 with title From: In(1), ylabel To: Out(1) contains an object of type line. This object represents sys\_mimo. Axes object 2 with ylabel To: Out(2) contains an object of type line. This object represents sys\_mimo. Axes object 3 with ylabel To: Out(3) contains an object of type line. This object represents sys\_mimo. Axes object 4 with title From: In(2) contains an object of type line. This object represents sys\_mimo. Axes object 5 contains an object of type line. This object represents sys\_mimo. Axes object 6 contains an object of type line. This object represents sys\_mimo. Axes object 7 with title From: In(3) contains an object of type line. This object represents sys\_mimo. Axes object 8 contains an object of type line. This object represents sys\_mimo. Axes object 9 contains an object of type line. This object represents sys\_mimo.

h =

	resppack.timeplot
p = getoptions(h)
p =

                   Normalize: 'off'
         SettleTimeThreshold: 0.0200
              RiseTimeLimits: [0.1000 0.9000]
                   TimeUnits: 'seconds'
    ConfidenceRegionNumberSD: 1
                  IOGrouping: 'none'
                 InputLabels: [1x1 struct]
                OutputLabels: [1x1 struct]
                InputVisible: {3x1 cell}
               OutputVisible: {3x1 cell}
                       Title: [1x1 struct]
                      XLabel: [1x1 struct]
                      YLabel: [1x1 struct]
                   TickLabel: [1x1 struct]
                        Grid: 'off'
                   GridColor: [0.1500 0.1500 0.1500]
                        XLim: {3x1 cell}
                        YLim: {3x1 cell}
                    XLimMode: {3x1 cell}
                    YLimMode: {3x1 cell}

setoptions를 사용하여 필요한 사용자 지정 옵션으로 플롯을 업데이트합니다.

setoptions(h,'Grid','on','GridColor',[1 0 0]);

Figure contains 9 axes objects. Axes object 1 with title From: In(1), ylabel To: Out(1) contains an object of type line. This object represents sys\_mimo. Axes object 2 with ylabel To: Out(2) contains an object of type line. This object represents sys\_mimo. Axes object 3 with ylabel To: Out(3) contains an object of type line. This object represents sys\_mimo. Axes object 4 with title From: In(2) contains an object of type line. This object represents sys\_mimo. Axes object 5 contains an object of type line. This object represents sys\_mimo. Axes object 6 contains an object of type line. This object represents sys\_mimo. Axes object 7 with title From: In(3) contains an object of type line. This object represents sys\_mimo. Axes object 8 contains an object of type line. This object represents sys\_mimo. Axes object 9 contains an object of type line. This object represents sys\_mimo.

setoptions를 호출하면 임펄스 플롯이 자동으로 업데이트됩니다. MIMO 모델의 경우 impulseplot은 여러 플롯으로 구성된 그리드를 생성하며, 각각의 플롯은 I/O 쌍 하나의 임펄스 응답을 표시합니다.

이 예제에서는 입력 3개, 출력 3개, 상태 3개인 MIMO 상태공간 모델이 있다고 가정하겠습니다. 선형 주파수 스케일을 사용하여 보드 플롯을 만들고 주파수 단위를 Hz로 지정한 다음, 그리드를 켭니다.

MIMO 상태공간 모델 sys_mimo를 만듭니다.

J = [8 -3 -3; -3 8 -3; -3 -3 8];
F = 0.2*eye(3);
A = -J\F;
B = inv(J);
C = eye(3);
D = 0;
sys_mimo = ss(A,B,C,D);
size(sys_mimo)
State-space model with 3 outputs, 3 inputs, and 3 states.

plot 핸들 h를 사용하여 보드 플롯을 만들고 사용 가능한 옵션 목록을 얻기 위해 getoptions를 사용합니다.

h = bodeplot(sys_mimo);
p = getoptions(h)
p =

                   FreqUnits: 'rad/s'
                   FreqScale: 'log'
                    MagUnits: 'dB'
                    MagScale: 'linear'
                  MagVisible: 'on'
             MagLowerLimMode: 'auto'
                  PhaseUnits: 'deg'
                PhaseVisible: 'on'
               PhaseWrapping: 'off'
               PhaseMatching: 'off'
           PhaseMatchingFreq: 0
    ConfidenceRegionNumberSD: 1
                 MagLowerLim: 0
          PhaseMatchingValue: 0
         PhaseWrappingBranch: -180
                  IOGrouping: 'none'
                 InputLabels: [1x1 struct]
                OutputLabels: [1x1 struct]
                InputVisible: {3x1 cell}
               OutputVisible: {3x1 cell}
                       Title: [1x1 struct]
                      XLabel: [1x1 struct]
                      YLabel: [1x1 struct]
                   TickLabel: [1x1 struct]
                        Grid: 'off'
                   GridColor: [0.1500 0.1500 0.1500]
                        XLim: {3x1 cell}
                        YLim: {6x1 cell}
                    XLimMode: {3x1 cell}
                    YLimMode: {6x1 cell}

setoptions를 사용하여 필요한 사용자 지정 옵션으로 플롯을 업데이트합니다.

setoptions(h,'FreqScale','linear','FreqUnits','Hz','Grid','on');

Figure contains 18 axes objects. Axes object 1 with title From: In(1), ylabel To: Out(1) contains an object of type line. This object represents sys\_mimo. Axes object 2 with ylabel To: Out(1) contains an object of type line. This object represents sys\_mimo. Axes object 3 with ylabel To: Out(2) contains an object of type line. This object represents sys\_mimo. Axes object 4 with ylabel To: Out(2) contains an object of type line. This object represents sys\_mimo. Axes object 5 with ylabel To: Out(3) contains an object of type line. This object represents sys\_mimo. Axes object 6 with ylabel To: Out(3) contains an object of type line. This object represents sys\_mimo. Axes object 7 with title From: In(2) contains an object of type line. This object represents sys\_mimo. Axes object 8 contains an object of type line. This object represents sys\_mimo. Axes object 9 contains an object of type line. This object represents sys\_mimo. Axes object 10 contains an object of type line. This object represents sys\_mimo. Axes object 11 contains an object of type line. This object represents sys\_mimo. Axes object 12 contains an object of type line. This object represents sys\_mimo. Axes object 13 with title From: In(3) contains an object of type line. This object represents sys\_mimo. Axes object 14 contains an object of type line. This object represents sys\_mimo. Axes object 15 contains an object of type line. This object represents sys\_mimo. Axes object 16 contains an object of type line. This object represents sys\_mimo. Axes object 17 contains an object of type line. This object represents sys\_mimo. Axes object 18 contains an object of type line. This object represents sys\_mimo.

setoptions를 호출하면 보드 플롯이 자동으로 업데이트됩니다. MIMO 모델의 경우 bodeplot은 여러 보드 플롯으로 구성된 배열을 생성하며, 각각의 플롯은 I/O 쌍 하나의 주파수 응답을 표시합니다.

다음 연속시간 전달 함수를 만듭니다.

H(s)=1s+1

sys = tf(1,[1 1]);

plot 핸들 h를 사용하여 보드 플롯을 만듭니다.

h = bodeplot(sys);

Figure contains 2 axes objects. Axes object 1 with ylabel Magnitude (dB) contains an object of type line. This object represents sys. Axes object 2 with ylabel Phase (deg) contains an object of type line. This object represents sys.

plot options 핸들 p를 만듭니다.

p = getoptions(h);

플롯의 주파수 단위를 Hz로 변경합니다.

p.FreqUnits = 'Hz';

플롯 옵션을 보드 플롯에 적용합니다.

setoptions(h,p);

Figure contains 2 axes objects. Axes object 1 with ylabel Magnitude (dB) contains an object of type line. This object represents sys. Axes object 2 with ylabel Phase (deg) contains an object of type line. This object represents sys.

또는 setoptions(h,'FreqUnits','Hz')를 사용합니다.

입력 인수

모두 축소

plot 핸들로, plot 핸들 객체로 지정됩니다. 예를 들어 h는 극점-영점 또는 I/O 극점-영점 플롯에 대한 mpzplot 객체입니다.

plot options 핸들로, plot options 핸들 객체로 지정됩니다. 예를 들어 p는 극점-영점 또는 I/O 극점-영점 플롯에 대한 PZMapOptions 객체입니다.

plot options 핸들을 만드는 방법에는 두 가지가 있습니다.

  • plot 핸들을 받고 plot options 핸들을 반환하는 getoptions를 사용합니다.

    p = getoptions(h)
    
  • 다음 명령 중 하나를 사용하여 디폴트 plot options 핸들을 만듭니다.

    예를 들어,

    p = bodeoptions
    

    보드 플롯에 대한 plot options 핸들을 반환합니다.

버전 내역

R2012a에 개발됨

참고 항목

도움말 항목