how to use the Bode matlab function to plot only the magnitude of a transfer function
조회 수: 54 (최근 30일)
이전 댓글 표시
Hello i woul like to know how to use the Bode matlab function to plot only the magnitude of a transfer function .not both the magnitude and and the phase
댓글 수: 0
답변 (2개)
Star Strider
2018년 11월 19일
If you only want the magnitude, call bode as:
[mag,phase,wout] = bode(sys);
then plot ‘mag’ as a funciton of ‘wout’:
figure
plot(wout,,squeeze(mag))
댓글 수: 1
Janagan Papperi Devarajulu Deenadayalan
2020년 11월 10일
Hello. I am facing a problem which is other way around. I have only the magnitude plot and I would like to extract the transfer function of the system. Is this possible by any chance?
Junfei Tang
2019년 4월 17일
The "bodeoptions" page of the MATLAB Documention lists the options of Bode Plot: https://se.mathworks.com/help/ident/ref/bodeoptions.html
To turn off the subplot of the phase, you can use
opts = bodeoptions('cstprefs');
opts.PhaseVisible = 'off';
before you use the "bode" function to create the plot.
Cheers and good luck! :-)
댓글 수: 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!