bodeplot(), setoptions - YLabel, How to set?
조회 수: 13 (최근 30일)
이전 댓글 표시
I have a bodeplot and want to change the Ylabel text from Magnitude to something more descriptive
h = bodeplot(sys,w);
setoptions(h,'YLabel','MyString');
doesn't work, so I look at it with getoptions()
>> getoptions(h,'Ylabel')
ans =
struct with fields:
String: {'Magnitude' 'Phase'}
FontSize: 11
FontWeight: 'normal'
FontAngle: 'normal'
Color: [0 0 0]
Interpreter: 'tex'
So it is a struct, but I cannot figure out how to address it properly with the way setoptions() is formatted. I tried:
setoptions(h,'YLabel(1).String','MyString')
which doesn't work or any of the other obvious variations. so now it's bothering me. Please help!
댓글 수: 0
채택된 답변
추가 답변 (1개)
Paul
2022년 2월 15일
opts = bodeoptions;
opts.Ylabel.String = {'mymag' 'myphase'};
bodeplot(tf(1,[1 1]),opts)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Response Computation and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!