margin 함수 문서에 따르면 crossover frequency가 여러개 있는 경우 여러 후보 게인 마진 값 중에서 0 dB에 가장 가까운 게인 마진을 반환한다고 되어 있습니다.
- When sys has more than one crossover, margin indicates the frequencies with gain margin closest to 0 dB and phase margin closest to 0°.
따라서 질문하신 두 경우는 모두 여러 후보 게인 마진 값 중에서 0dB에 가까운 것을 (보수적으로) 선택한 결과입니다.
만약 모든 후보 게인 마진 값과 그에 대응하는 주파수 값을 보기 위해서는 allmargin을 사용하실 수 있습니다. 출력값의 형태는 struct이며 문서의 설명에서 볼 수 있듯이 GMFrequency와 GainMargin 필드로 모든 crossover frequency에 대응하는 게인 마진 값이 출력됩니다.
- GMFrequency: All -180° (modulo 360°) crossover frequencies in rad/TimeUnit, where TimeUnit is the time units, specified in the TimeUnit property of L.
- GainMargin: Corresponding gain margins, defined as 1/G, where G is the gain at the -180° crossover frequency. Gain margins are in absolute units.