Easier way to remove a response from a response plot (bodeplot, stepplot, etc.)?

19 次查看(过去 30 天)
Is there a more convenient way to remove a response from a response plot generated using Control System Toolbox functions? I'm working with Bode diagrams, but this could apply to any response plot. After some digging, the only way I found was to a method in the resppack.bodeplot class called, rmresponse. From trial-and-error, I stumbled on a syntax...
%% Generate a Bode diagram with 2 responses
h = bodeplot(rss(1));
hold on
bodeplot(rss(1));
%% Remove the 1st response
idx = 1; %index of response to delete in the order stored in h.Responses
wave2rm = h.Responses(idx); %handle to response (waveform object)
h.rmresponse(wave2rm)
Even manually selecting the line group and pressing delete does nothing. I can hide the response using the context menu, but I'd rather remove it entirely. I'm always reluctant to rely on undocumented MATLAB features because another user will not be able to search for help. However, in this case, there just isn't much documentation on manipulating graphics produced by the Control System Toolbox.
So I was wondering if I'm missing something? Or if documentation does exist somewhere out there on these Control System Toolbox classes (i.e. resppack, wavepack, etc.)?

采纳的回答

Paul
Paul 2020-8-1
Does this do what you want:
delete(h.Responses(idx))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time and Frequency Domain Analysis 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by