extracting values from bode()
조회 수: 86 (최근 30일)
이전 댓글 표시
Hi,
I know that you can do the following to get the magnitude phase and w from using the bode() call (which requires transfer function input.
[mag, phase, wout] = bode(sys)
The problem I am having with this call was that the vectors that are returned are of too small. I see in the doc that the size of the array depends on NY and NU input and outputs, but i'm not quite sure how to increase NY and NU so that I can extract more values from the bode plot.
This is particularly confusing because when you call bode(), you have many many points that go from small frequencies to very large, so I don't know why when you extract mag and phase, it limits it to a certain sized vector.
All suggestions are appreciated. Tia
댓글 수: 0
채택된 답변
Craig
2012년 5월 8일
Hi,
The NY and NU sizes are based on the number IOs (inputs and outputs) your system has and would be fixed. You can compute the response at various frequencies with the resulting mag and phase being a NY-by-Nu-by-Nw vector where Nw is the number of frequency points. If you are trying to extract data at more frequencies or a specific set of frequencies you can specify the frequency vector explicitly
[mag,phase,wout] = bode(sys,win)
In this case win = wout. For example, evaluating 100 points equally logrithmic spaced points between 10^-1 and 10 would be done has follows
[mag,phase,wout] = bode(sys, logspace(-1,1,100))
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Plot Customization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!